SceneRoot.cs 593 B

12345678910111213141516171819202122232425262728293031
  1. using UnityEngine;
  2. using System.Collections;
  3. public class SceneRoot : MonoBehaviour
  4. {
  5. public Bounds mainBound;
  6. private bool bInitEnd = false;
  7. public bool InitEnd { get { return bInitEnd; }set { bInitEnd = value; } }
  8. private Tree mTree;
  9. public Tree T
  10. {
  11. get { return mTree; }
  12. set { mTree = value; }
  13. }
  14. #if UNITY_EDITOR
  15. private void OnDrawGizmos()
  16. {
  17. if (bInitEnd)
  18. {
  19. mTree.DrawBound();
  20. }
  21. else
  22. {
  23. Gizmos.DrawWireCube(mainBound.center, mainBound.size);
  24. }
  25. }
  26. #endif
  27. }