Sending UI events to world [](/../../#glossary)

May 29, 2020 ยท View on GitHub

It's the same as the method above.

public class YourUIBehaviour : MonoBehaviour {
    
    public Button button;
    
    public void Start() {
    
        this.button.onClick.AddListener(this.AddMarker);
    
    }
    
    ...
    
    private void AddMarker() {
        
        // Send marker click to world
        Worlds.currentWorld.AddMarker(new OnYourUIBehaviourClick());
        
    }
    
}