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 UnityEngine;
namespace Textus.SerializeReferenceUI.Editor
{
[CustomPropertyDrawer(typeof(SerializeReferenceButtonAttribute))]
public class SerializeReferenceButtonAttributeDrawer : PropertyDrawer
{
@ -27,4 +29,5 @@ public class SerializeReferenceButtonAttributeDrawer : PropertyDrawer
EditorGUI.EndProperty();
}
}
}
#endif

View File

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

View File

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

View File

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

View File

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

View File

@ -4,6 +4,8 @@ using System.Collections.Generic;
using UnityEditor;
using UnityEngine;
namespace Textus.SerializeReferenceUI.Editor
{
public static class SerializeReferenceInspectorMiddleMouseMenu
{
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);
}
}
}
#endif