void ReleaseDesignerOutlets() { if (Button != null) { Button.Dispose(); Button = null; } if (PositionLabel != null) { PositionLabel.Dispose(); PositionLabel = null; } if (RandomButton != null) { RandomButton.Dispose(); RandomButton = null; } if (ResetButton != null) { ResetButton.Dispose(); ResetButton = null; } }
// Use this for initialization void Awake() { if (s_instance != null) { Destroy(this); } s_instance = this; DontDestroyOnLoad(this); button.onClick.AddListener(PlayRandom); Hide(); }
public void SetUICanvasCallback(Action <GameObject> callback) { RandomButton.UICallback = callback; RandomButton.InitCanvasVRTK(); }
public void OnRoomUnloaded() { RandomButton.Hide(); }
public void OnRoomLoaded() { RandomButton.Show(); }
public override void OnModUnload() { RandomButton.DestroyRandomButton(); }