浏览代码

Reorganised editor tools, added ReadOnly attribute

/main
Ciro Continisio 3 年前
当前提交
c284ce4c
共有 53 个文件被更改,包括 121 次插入3 次删除
  1. 2
      UOP1_Project/Assets/Scripts/Characters/StateMachine/Actions/Editor/AnimatorParameterActionSOEditor.cs
  2. 2
      UOP1_Project/Assets/Scripts/EditorTools/Attributes/ReadOnlyAttribute/ReadOnlyAttribute.cs.meta
  3. 2
      UOP1_Project/Assets/Scripts/EditorTools/Attributes/ReadOnlyAttribute/Editor/ReadOnlyDrawer.cs.meta
  4. 8
      UOP1_Project/Assets/Scripts/EditorTools/Attributes.meta
  5. 8
      UOP1_Project/Assets/Scripts/EditorTools/MonoBehaviours.meta
  6. 8
      UOP1_Project/Assets/Scripts/EditorTools/Attributes/ReadOnlyAttribute.meta
  7. 8
      UOP1_Project/Assets/Scripts/EditorTools/Attributes/ReadOnlyAttribute/Editor.meta
  8. 18
      UOP1_Project/Assets/Scripts/EditorTools/Attributes/ReadOnlyAttribute/Editor/ReadOnlyDrawer.cs
  9. 3
      UOP1_Project/Assets/Scripts/EditorTools/Attributes/ReadOnlyAttribute/ReadOnlyAttribute.cs
  10. 25
      UOP1_Project/Assets/Scripts/EditorTools/Editor/CustomBaseEditor.cs
  11. 8
      UOP1_Project/Assets/Scripts/EditorTools/Editor/ReplaceObject_ContextualHierarchy.meta
  12. 8
      UOP1_Project/Assets/Scripts/EditorTools/Editor/ReplaceObject_Window.meta
  13. 8
      UOP1_Project/Assets/Scripts/EditorTools/Editor/ScriptableObjectBrowser.meta
  14. 8
      UOP1_Project/Assets/Scripts/EditorTools/MonoBehaviours/ClickToPlace.meta
  15. 8
      UOP1_Project/Assets/Scripts/EditorTools/MonoBehaviours/ClickToPlace/Editor.meta
  16. 0
      /UOP1_Project/Assets/Scripts/EditorTools/MonoBehaviours/ClickToPlace/ClickToPlaceHelper.cs.meta
  17. 0
      /UOP1_Project/Assets/Scripts/EditorTools/MonoBehaviours/ClickToPlace/ClickToPlaceHelper.cs
  18. 0
      /UOP1_Project/Assets/Scripts/EditorTools/MonoBehaviours/LightmapScaleSetter.cs.meta
  19. 0
      /UOP1_Project/Assets/Scripts/EditorTools/MonoBehaviours/LightmapScaleSetter.cs
  20. 0
      /UOP1_Project/Assets/Scripts/EditorTools/Editor.meta
  21. 0
      /UOP1_Project/Assets/Scripts/EditorTools/Attributes/ReadOnlyAttribute/ReadOnlyAttribute.cs.meta
  22. 0
      /UOP1_Project/Assets/Scripts/EditorTools/Editor/ReplaceObject_Window/ReplaceTool.cs.meta
  23. 0
      /UOP1_Project/Assets/Scripts/EditorTools/MonoBehaviours/ClickToPlace/Editor/ClickToPlaceHelperEditor.cs
  24. 0
      /UOP1_Project/Assets/Scripts/EditorTools/MonoBehaviours/ClickToPlace/Editor/ClickToPlaceHelperEditor.cs.meta
  25. 0
      /UOP1_Project/Assets/Scripts/EditorTools/Editor/ReplaceObject_ContextualHierarchy/GameObjectPreview.cs
  26. 0
      /UOP1_Project/Assets/Scripts/EditorTools/Editor/ReplaceObject_ContextualHierarchy/GameObjectPreview.cs.meta
  27. 0
      /UOP1_Project/Assets/Scripts/EditorTools/Editor/ReplaceObject_ContextualHierarchy/PrefabSelectionTreeView.cs
  28. 0
      /UOP1_Project/Assets/Scripts/EditorTools/Editor/ReplaceObject_ContextualHierarchy/PrefabSelectionTreeView.cs.meta
  29. 0
      /UOP1_Project/Assets/Scripts/EditorTools/Editor/ReplaceObject_ContextualHierarchy/ReplaceContextMenu.cs
  30. 0
      /UOP1_Project/Assets/Scripts/EditorTools/Editor/ReplaceObject_ContextualHierarchy/ReplaceContextMenu.cs.meta
  31. 0
      /UOP1_Project/Assets/Scripts/EditorTools/Editor/ReplaceObject_ContextualHierarchy/ReplacePrefabSearchPopup.cs
  32. 0
      /UOP1_Project/Assets/Scripts/EditorTools/Editor/ReplaceObject_ContextualHierarchy/ReplacePrefabSearchPopup.cs.meta
  33. 0
      /UOP1_Project/Assets/Scripts/EditorTools/Attributes/ReadOnlyAttribute/Editor/ReadOnlyDrawer.cs.meta
  34. 0
      /UOP1_Project/Assets/Scripts/EditorTools/Editor/CustomBaseEditor.cs.meta
  35. 0
      /UOP1_Project/Assets/Scripts/EditorTools/Editor/Pathway.meta
  36. 0
      /UOP1_Project/Assets/Scripts/EditorTools/Editor/Pathway
  37. 0
      /UOP1_Project/Assets/Scripts/EditorTools/Editor/ReplaceObject_Window/ReplaceTool.cs
  38. 0
      /UOP1_Project/Assets/Scripts/EditorTools/Editor/SceneSelector.meta
  39. 0
      /UOP1_Project/Assets/Scripts/EditorTools/Editor/SceneSelector
  40. 0
      /UOP1_Project/Assets/Scripts/EditorTools/Editor/ScriptableObjectBrowser/ScriptableObjectBrowser.cs
  41. 0
      /UOP1_Project/Assets/Scripts/EditorTools/Editor/ScriptableObjectBrowser/ScriptableObjectBrowser.cs.meta

2
UOP1_Project/Assets/Scripts/Characters/StateMachine/Actions/Editor/AnimatorParameterActionSOEditor.cs


{
public override void OnInspectorGUI()
{
DrawNonEdtiableScriptReference<AnimatorParameterActionSO>();
base.DrawNonEditableScriptReference<AnimatorParameterActionSO>();
serializedObject.Update();

2
UOP1_Project/Assets/Scripts/EditorTools/Attributes/ReadOnlyAttribute/ReadOnlyAttribute.cs.meta


fileFormatVersion: 2
guid: 0e46e2d2cecfc354a8ac70cae65b2343
guid: c9b15a16152384b70879986c7a0e1982
MonoImporter:
externalObjects: {}
serializedVersion: 2

2
UOP1_Project/Assets/Scripts/EditorTools/Attributes/ReadOnlyAttribute/Editor/ReadOnlyDrawer.cs.meta


fileFormatVersion: 2
guid: 0a7eba3a614f3d74fb12d27b80cd0597
guid: 71fe895ae92594c45b322887f1361c4f
MonoImporter:
externalObjects: {}
serializedVersion: 2

8
UOP1_Project/Assets/Scripts/EditorTools/Attributes.meta


fileFormatVersion: 2
guid: d76ab86f9ebf9441488d7405875bc26c
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

8
UOP1_Project/Assets/Scripts/EditorTools/MonoBehaviours.meta


fileFormatVersion: 2
guid: 4d794dc4ece784dc0b636f206f22d432
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

8
UOP1_Project/Assets/Scripts/EditorTools/Attributes/ReadOnlyAttribute.meta


fileFormatVersion: 2
guid: e0e3fbb302c364959bd678c47f45aa46
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

8
UOP1_Project/Assets/Scripts/EditorTools/Attributes/ReadOnlyAttribute/Editor.meta


fileFormatVersion: 2
guid: 85c89ea7129e248ada1114f684082a0c
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

18
UOP1_Project/Assets/Scripts/EditorTools/Attributes/ReadOnlyAttribute/Editor/ReadOnlyDrawer.cs


using UnityEngine;
using UnityEditor;
/// <summary>
/// Custom drawer for the ReadOnly attribute
/// </summary>
[CustomPropertyDrawer(typeof(ReadOnlyAttribute))]
public class ReadOnlyDrawer : PropertyDrawer
{
public override void OnGUI(Rect position, SerializedProperty property, GUIContent label)
{
bool previousGUIState = GUI.enabled;
GUI.enabled = false;
EditorGUI.PropertyField(position, property, label);
GUI.enabled = previousGUIState;
}
}

3
UOP1_Project/Assets/Scripts/EditorTools/Attributes/ReadOnlyAttribute/ReadOnlyAttribute.cs


using UnityEngine;
public class ReadOnlyAttribute : PropertyAttribute { }

25
UOP1_Project/Assets/Scripts/EditorTools/Editor/CustomBaseEditor.cs


using UnityEditor;
using UnityEngine;
/// <summary>
/// Custom base editor class with handy methods for GUI drawing.
/// </summary>
public class CustomBaseEditor : Editor
{
/// <summary>
/// Draw the default, non-editable script field. Useful when creating a custom Inspector but we want it to look like a default one.
/// Plus, it's handy to be able to click on the field to ping the Script in the Project window.
/// </summary>
/// <typeparam name="T">Inspected type.</typeparam>
public void DrawNonEditableScriptReference<T>() where T : Object
{
GUI.enabled = false;
if (typeof(ScriptableObject).IsAssignableFrom(typeof(T)))
EditorGUILayout.ObjectField("Script", MonoScript.FromScriptableObject((ScriptableObject)target), typeof(T), false);
else if (typeof(MonoBehaviour).IsAssignableFrom(typeof(T)))
EditorGUILayout.ObjectField("Script", MonoScript.FromMonoBehaviour((MonoBehaviour)target), typeof(T), false);
GUI.enabled = true;
}
}

8
UOP1_Project/Assets/Scripts/EditorTools/Editor/ReplaceObject_ContextualHierarchy.meta


fileFormatVersion: 2
guid: 140b6bac9a3f6483a913a763b17c7f0e
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

8
UOP1_Project/Assets/Scripts/EditorTools/Editor/ReplaceObject_Window.meta


fileFormatVersion: 2
guid: afd5c1b309a7e4923b9a81ce693a3fd4
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

8
UOP1_Project/Assets/Scripts/EditorTools/Editor/ScriptableObjectBrowser.meta


fileFormatVersion: 2
guid: b045fdbe33cac4d88bce4c4ee162c2e0
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

8
UOP1_Project/Assets/Scripts/EditorTools/MonoBehaviours/ClickToPlace.meta


fileFormatVersion: 2
guid: 196c019f750b445f4857f91c5a7066b7
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

8
UOP1_Project/Assets/Scripts/EditorTools/MonoBehaviours/ClickToPlace/Editor.meta


fileFormatVersion: 2
guid: 17695f0fac67240dc996a544fc85f890
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

/UOP1_Project/Assets/Scripts/EditorTools/ClickToPlaceHelper.cs.meta → /UOP1_Project/Assets/Scripts/EditorTools/MonoBehaviours/ClickToPlace/ClickToPlaceHelper.cs.meta

/UOP1_Project/Assets/Scripts/EditorTools/ClickToPlaceHelper.cs → /UOP1_Project/Assets/Scripts/EditorTools/MonoBehaviours/ClickToPlace/ClickToPlaceHelper.cs

/UOP1_Project/Assets/Scripts/EditorTools/LightmapScaleSetter.cs.meta → /UOP1_Project/Assets/Scripts/EditorTools/MonoBehaviours/LightmapScaleSetter.cs.meta

/UOP1_Project/Assets/Scripts/EditorTools/LightmapScaleSetter.cs → /UOP1_Project/Assets/Scripts/EditorTools/MonoBehaviours/LightmapScaleSetter.cs

/UOP1_Project/Assets/Scripts/Editor.meta → /UOP1_Project/Assets/Scripts/EditorTools/Editor.meta

/UOP1_Project/Assets/Scripts/Input/Editor/InputReaderEditor.cs.meta → /UOP1_Project/Assets/Scripts/EditorTools/Attributes/ReadOnlyAttribute/ReadOnlyAttribute.cs.meta

/UOP1_Project/Assets/Scripts/Editor/ReplaceTool.cs.meta → /UOP1_Project/Assets/Scripts/EditorTools/Editor/ReplaceObject_Window/ReplaceTool.cs.meta

/UOP1_Project/Assets/Scripts/Editor/ClickToPlaceHelperEditor.cs → /UOP1_Project/Assets/Scripts/EditorTools/MonoBehaviours/ClickToPlace/Editor/ClickToPlaceHelperEditor.cs

/UOP1_Project/Assets/Scripts/Editor/ClickToPlaceHelperEditor.cs.meta → /UOP1_Project/Assets/Scripts/EditorTools/MonoBehaviours/ClickToPlace/Editor/ClickToPlaceHelperEditor.cs.meta

/UOP1_Project/Assets/Scripts/Editor/GameObjectPreview.cs → /UOP1_Project/Assets/Scripts/EditorTools/Editor/ReplaceObject_ContextualHierarchy/GameObjectPreview.cs

/UOP1_Project/Assets/Scripts/Editor/GameObjectPreview.cs.meta → /UOP1_Project/Assets/Scripts/EditorTools/Editor/ReplaceObject_ContextualHierarchy/GameObjectPreview.cs.meta

/UOP1_Project/Assets/Scripts/Editor/PrefabSelectionTreeView.cs → /UOP1_Project/Assets/Scripts/EditorTools/Editor/ReplaceObject_ContextualHierarchy/PrefabSelectionTreeView.cs

/UOP1_Project/Assets/Scripts/Editor/PrefabSelectionTreeView.cs.meta → /UOP1_Project/Assets/Scripts/EditorTools/Editor/ReplaceObject_ContextualHierarchy/PrefabSelectionTreeView.cs.meta

/UOP1_Project/Assets/Scripts/Editor/ReplaceContextMenu.cs → /UOP1_Project/Assets/Scripts/EditorTools/Editor/ReplaceObject_ContextualHierarchy/ReplaceContextMenu.cs

/UOP1_Project/Assets/Scripts/Editor/ReplaceContextMenu.cs.meta → /UOP1_Project/Assets/Scripts/EditorTools/Editor/ReplaceObject_ContextualHierarchy/ReplaceContextMenu.cs.meta

/UOP1_Project/Assets/Scripts/Editor/ReplacePrefabSearchPopup.cs → /UOP1_Project/Assets/Scripts/EditorTools/Editor/ReplaceObject_ContextualHierarchy/ReplacePrefabSearchPopup.cs

/UOP1_Project/Assets/Scripts/Editor/ReplacePrefabSearchPopup.cs.meta → /UOP1_Project/Assets/Scripts/EditorTools/Editor/ReplaceObject_ContextualHierarchy/ReplacePrefabSearchPopup.cs.meta

/UOP1_Project/Assets/Scripts/Editor/ScriptableObjectHelper.cs.meta → /UOP1_Project/Assets/Scripts/EditorTools/Attributes/ReadOnlyAttribute/Editor/ReadOnlyDrawer.cs.meta

/UOP1_Project/Assets/Scripts/Editor/CustomBaseEditor.cs.meta → /UOP1_Project/Assets/Scripts/EditorTools/Editor/CustomBaseEditor.cs.meta

/UOP1_Project/Assets/Scripts/Editor/Pathway.meta → /UOP1_Project/Assets/Scripts/EditorTools/Editor/Pathway.meta

/UOP1_Project/Assets/Scripts/Editor/Pathway → /UOP1_Project/Assets/Scripts/EditorTools/Editor/Pathway

/UOP1_Project/Assets/Scripts/Editor/ReplaceTool.cs → /UOP1_Project/Assets/Scripts/EditorTools/Editor/ReplaceObject_Window/ReplaceTool.cs

/UOP1_Project/Assets/Scripts/Editor/SceneSelector.meta → /UOP1_Project/Assets/Scripts/EditorTools/Editor/SceneSelector.meta

/UOP1_Project/Assets/Scripts/Editor/SceneSelector → /UOP1_Project/Assets/Scripts/EditorTools/Editor/SceneSelector

/UOP1_Project/Assets/Scripts/Editor/ScriptableObjectBrowser.cs → /UOP1_Project/Assets/Scripts/EditorTools/Editor/ScriptableObjectBrowser/ScriptableObjectBrowser.cs

/UOP1_Project/Assets/Scripts/Editor/ScriptableObjectBrowser.cs.meta → /UOP1_Project/Assets/Scripts/EditorTools/Editor/ScriptableObjectBrowser/ScriptableObjectBrowser.cs.meta

正在加载...
取消
保存