editor namespace

This commit is contained in:
max 2022-12-28 14:06:42 +01:00
parent 0d04c50612
commit acec8003c1
6 changed files with 248 additions and 230 deletions

View File

@ -4,6 +4,8 @@ using System.Collections.Generic;
using UnityEditor; using UnityEditor;
using UnityEngine; using UnityEngine;
namespace Textus.SerializeReferenceUI.Editor
{
[CustomPropertyDrawer(typeof(SerializeReferenceButtonAttribute))] [CustomPropertyDrawer(typeof(SerializeReferenceButtonAttribute))]
public class SerializeReferenceButtonAttributeDrawer : PropertyDrawer public class SerializeReferenceButtonAttributeDrawer : PropertyDrawer
{ {
@ -27,4 +29,5 @@ public class SerializeReferenceButtonAttributeDrawer : PropertyDrawer
EditorGUI.EndProperty(); EditorGUI.EndProperty();
} }
} }
}
#endif #endif

View File

@ -4,6 +4,8 @@ using System.Collections.Generic;
using UnityEditor; using UnityEditor;
using UnityEngine; using UnityEngine;
namespace Textus.SerializeReferenceUI.Editor
{
[CustomPropertyDrawer(typeof(SerializeReferenceMenuAttribute))] [CustomPropertyDrawer(typeof(SerializeReferenceMenuAttribute))]
public class SerializeReferenceMenuAttributeDrawer : PropertyDrawer public class SerializeReferenceMenuAttributeDrawer : PropertyDrawer
{ {
@ -23,4 +25,5 @@ public class SerializeReferenceMenuAttributeDrawer : PropertyDrawer
EditorGUI.EndProperty(); EditorGUI.EndProperty();
} }
} }
}
#endif #endif

View File

@ -6,6 +6,8 @@ using UnityEditor;
using UnityEngine; using UnityEngine;
using Object = UnityEngine.Object; using Object = UnityEngine.Object;
namespace Textus.SerializeReferenceUI.Editor
{
public static class ManagedReferenceUtility public static class ManagedReferenceUtility
{ {
/// Creates instance of passed type and assigns it to managed reference /// Creates instance of passed type and assigns it to managed reference
@ -113,4 +115,5 @@ public static class ManagedReferenceUtility
return (typeAssemblyName, typeClassName); return (typeAssemblyName, typeClassName);
} }
} }
}
#endif #endif

View File

@ -5,6 +5,8 @@ using System.Linq;
using UnityEditor; using UnityEditor;
using UnityEngine; using UnityEngine;
namespace Textus.SerializeReferenceUI.Editor
{
public static class SerializeReferenceGenericSelectionMenu public static class SerializeReferenceGenericSelectionMenu
{ {
/// Purpose. /// Purpose.
@ -79,4 +81,5 @@ public static class SerializeReferenceGenericSelectionMenu
public readonly Type Type; public readonly Type Type;
} }
} }
}
#endif #endif

View File

@ -4,6 +4,8 @@ using System.Collections.Generic;
using UnityEditor; using UnityEditor;
using UnityEngine; using UnityEngine;
namespace Textus.SerializeReferenceUI.Editor
{
public static class SerializeReferenceInspectorButton public static class SerializeReferenceInspectorButton
{ {
/// Must be drawn before DefaultProperty in order to receive input /// Must be drawn before DefaultProperty in order to receive input
@ -35,4 +37,5 @@ public static class SerializeReferenceInspectorButton
EditorGUI.indentLevel = storedIndent; EditorGUI.indentLevel = storedIndent;
} }
} }
}
#endif #endif

View File

@ -4,6 +4,8 @@ using System.Collections.Generic;
using UnityEditor; using UnityEditor;
using UnityEngine; using UnityEngine;
namespace Textus.SerializeReferenceUI.Editor
{
public static class SerializeReferenceInspectorMiddleMouseMenu public static class SerializeReferenceInspectorMiddleMouseMenu
{ {
public static void ShowContextMenuForManagedReferenceOnMouseMiddleButton(this SerializedProperty property, Rect position, IEnumerable<Func<Type, bool>> filters = null) public static void ShowContextMenuForManagedReferenceOnMouseMiddleButton(this SerializedProperty property, Rect position, IEnumerable<Func<Type, bool>> filters = null)
@ -17,4 +19,5 @@ public static class SerializeReferenceInspectorMiddleMouseMenu
property.ShowContextMenuForManagedReference(filters); property.ShowContextMenuForManagedReference(filters);
} }
} }
}
#endif #endif