SphereSelectionEventsExample.cs 517 B

1234567891011121314151617181920212223242526
  1. using UnityEngine;
  2. using HighlightPlus;
  3. namespace HighlightPlus.Demos {
  4. public class SphereSelectionEventsExample : MonoBehaviour {
  5. void Start() {
  6. HighlightManager.instance.OnObjectSelected += OnObjectSelected;
  7. HighlightManager.instance.OnObjectUnSelected += OnObjectUnSelected;
  8. }
  9. bool OnObjectSelected(GameObject go) {
  10. Debug.Log(go.name + " selected!");
  11. return true;
  12. }
  13. bool OnObjectUnSelected(GameObject go) {
  14. Debug.Log(go.name + " un-selected!");
  15. return true;
  16. }
  17. }
  18. }