TestMesh.cs 375 B

1234567891011121314151617181920
  1. using UnityEngine;
  2. using System.Collections;
  3. using System.Collections.Generic;
  4. public class TestMesh : MonoBehaviour
  5. {
  6. MeshRenderer mr;
  7. #if UNITY_EDITOR
  8. private void OnDrawGizmos()
  9. {
  10. if(mr == null)
  11. mr = GetComponent<MeshRenderer>();
  12. if(mr!=null)
  13. Gizmos.DrawWireCube(mr.bounds.center, mr.bounds.size);
  14. }
  15. #endif
  16. }