Skip to content

Latest commit

 

History

History
26 lines (16 loc) · 523 Bytes

Manual-SendingUIEventsToWorld.md

File metadata and controls

26 lines (16 loc) · 523 Bytes

Sending UI events to world

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());
        
    }
    
}