MaterialInspector.cs 1.0 KB

1234567891011121314151617181920212223242526272829303132
  1. // Pcx - Point cloud importer & renderer for Unity
  2. // https://github.com/keijiro/Pcx
  3. using UnityEngine;
  4. using UnityEditor;
  5. namespace Pcx
  6. {
  7. class PointMaterialInspector : ShaderGUI
  8. {
  9. public override void OnGUI(MaterialEditor editor, MaterialProperty[] props)
  10. {
  11. editor.ShaderProperty(FindProperty("_Tint", props), "Tint");
  12. editor.ShaderProperty(FindProperty("_PointSize", props), "Point Size");
  13. editor.ShaderProperty(FindProperty("_Distance", props), "Apply Distance");
  14. EditorGUILayout.HelpBox(
  15. "Only some platform support these point size properties.",
  16. MessageType.None
  17. );
  18. }
  19. }
  20. class DiskMaterialInspector : ShaderGUI
  21. {
  22. public override void OnGUI(MaterialEditor editor, MaterialProperty[] props)
  23. {
  24. editor.ShaderProperty(FindProperty("_Tint", props), "Tint");
  25. editor.ShaderProperty(FindProperty("_PointSize", props), "Point Size");
  26. }
  27. }
  28. }