TC_ComputeEditor.cs 790 B

1234567891011121314151617181920212223242526272829
  1. using UnityEngine;
  2. using UnityEditor;
  3. using System.Collections;
  4. namespace TerrainComposer2
  5. {
  6. [CustomEditor(typeof(TC_Compute))]
  7. public class TC_ComputeEditor : Editor
  8. {
  9. void OnEnable()
  10. {
  11. Transform t = ((MonoBehaviour)target).transform;
  12. t.hideFlags = HideFlags.NotEditable | HideFlags.HideInInspector;
  13. }
  14. public override void OnInspectorGUI()
  15. {
  16. if (TC_Settings.instance == null) return;
  17. if (TC_Settings.instance.debugMode) DrawDefaultInspector(); else DrawCustomInspector();
  18. }
  19. void DrawCustomInspector()
  20. {
  21. TD.DrawSpacer();
  22. TD.DrawLabel("This script is needed for generating on the GPU", 12);
  23. TD.DrawSpacer();
  24. }
  25. }
  26. }