暫無描述
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

DisableGizmos.cs 412B

123456789101112131415161718192021
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEditor;
  4. using UnityEngine;
  5. [ExecuteInEditMode]
  6. public class DisableGizmos : MonoBehaviour
  7. {
  8. // Start is called before the first frame update
  9. void Awake()
  10. {
  11. #if UNITY_EDITOR
  12. SceneView view = SceneView.lastActiveSceneView;
  13. if (view != null)
  14. {
  15. view.drawGizmos = false;
  16. }
  17. #endif
  18. }
  19. }