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.

35 lines
821 B

  1. using UnityEngine;
  2. using UnityEditor;
  3. using System;
  4. using System.Collections;
  5. namespace AmplifyShaderEditor
  6. {
  7. [CustomEditor( typeof( AmplifyShaderFunction ) )]
  8. public class AmplifyShaderFunctionEditor : Editor
  9. {
  10. AmplifyShaderFunction m_target;
  11. void OnEnable()
  12. {
  13. m_target = ( target as AmplifyShaderFunction );
  14. }
  15. public override void OnInspectorGUI()
  16. {
  17. //base.OnInspectorGUI();
  18. //base.serializedObject.Update();
  19. if( GUILayout.Button( "Open in Shader Editor" ) )
  20. {
  21. AmplifyShaderEditorWindow.LoadShaderFunctionToASE( m_target, false );
  22. }
  23. //EditorGUILayout.Separator();
  24. //m_target.FunctionInfo = EditorGUILayout.TextArea( m_target.FunctionInfo );
  25. if( m_target.Description.Length > 0 )
  26. {
  27. EditorGUILayout.HelpBox( m_target.Description, MessageType.Info );
  28. }
  29. }
  30. }
  31. }