0.2.0: Moved into inspector drawer from module.toolbox to module.inspector
This commit is contained in:
parent
5671c2c754
commit
ffec2abdf4
227 changed files with 5306 additions and 29 deletions
14
Runtime/Drawers/EnumFlag.cs
Normal file
14
Runtime/Drawers/EnumFlag.cs
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
using System;
|
||||
using UnityEngine.Scripting;
|
||||
|
||||
namespace Module.Inspector
|
||||
{
|
||||
[AttributeUsage(AttributeTargets.Field, AllowMultiple = false, Inherited = true)]
|
||||
public sealed class EnumFlag : DrawerPropertyAttribute
|
||||
{
|
||||
[Preserve]
|
||||
public EnumFlag()
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
11
Runtime/Drawers/EnumFlag.cs.meta
Normal file
11
Runtime/Drawers/EnumFlag.cs.meta
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 7a13196e6dff9404d81a3911bb06cc55
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
22
Runtime/Drawers/FilePath.cs
Normal file
22
Runtime/Drawers/FilePath.cs
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
using System;
|
||||
|
||||
namespace Module.Inspector
|
||||
{
|
||||
[AttributeUsage(AttributeTargets.Field, AllowMultiple = false, Inherited = true)]
|
||||
public sealed class FilePath : DrawerPropertyAttribute
|
||||
{
|
||||
public readonly bool useAbsolute;
|
||||
public readonly string extension = "*";
|
||||
|
||||
public FilePath(bool useAbsolute = false)
|
||||
{
|
||||
this.useAbsolute = useAbsolute;
|
||||
}
|
||||
|
||||
public FilePath(string extension, bool useAbsolute = false)
|
||||
{
|
||||
this.extension = extension;
|
||||
this.useAbsolute = useAbsolute;
|
||||
}
|
||||
}
|
||||
}
|
||||
11
Runtime/Drawers/FilePath.cs.meta
Normal file
11
Runtime/Drawers/FilePath.cs.meta
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 8d62b72f20cb29b4f9ba3774c21ea275
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
15
Runtime/Drawers/FolderPath.cs
Normal file
15
Runtime/Drawers/FolderPath.cs
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
using System;
|
||||
|
||||
namespace Module.Inspector
|
||||
{
|
||||
[AttributeUsage(AttributeTargets.Field, AllowMultiple = false, Inherited = true)]
|
||||
public sealed class FolderPath : DrawerPropertyAttribute
|
||||
{
|
||||
public readonly bool useAbsolute;
|
||||
|
||||
public FolderPath(bool useAbsolute = false)
|
||||
{
|
||||
this.useAbsolute = useAbsolute;
|
||||
}
|
||||
}
|
||||
}
|
||||
11
Runtime/Drawers/FolderPath.cs.meta
Normal file
11
Runtime/Drawers/FolderPath.cs.meta
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 19f4936da040eda458dad2d7ac69efcb
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
48
Runtime/Drawers/IntToEnum.cs
Normal file
48
Runtime/Drawers/IntToEnum.cs
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
using System;
|
||||
using Module.Inspector.Utilities;
|
||||
using UnityEngine.Scripting;
|
||||
|
||||
namespace Module.Inspector
|
||||
{
|
||||
[AttributeUsage(AttributeTargets.Field, AllowMultiple = false, Inherited = true)]
|
||||
public sealed class IntToEnum : DrawerPropertyAttribute
|
||||
{
|
||||
private Type type;
|
||||
|
||||
private readonly string strTypeReplaceWith;
|
||||
private bool hasTriedFetchReplaceType;
|
||||
|
||||
[Preserve]
|
||||
public IntToEnum(Type type)
|
||||
{
|
||||
this.type = type;
|
||||
hasTriedFetchReplaceType = true;
|
||||
}
|
||||
|
||||
[Preserve]
|
||||
public IntToEnum(Type type, string strTypeReplaceWith)
|
||||
{
|
||||
this.type = type;
|
||||
this.strTypeReplaceWith = strTypeReplaceWith;
|
||||
}
|
||||
|
||||
public Type GetValidType()
|
||||
{
|
||||
if (hasTriedFetchReplaceType)
|
||||
return type;
|
||||
|
||||
#if UNITY_EDITOR
|
||||
Type replaceType = ReflectionUtility.GetAnyTypeWithName(strTypeReplaceWith);
|
||||
#else
|
||||
Type replaceType = null;
|
||||
#endif
|
||||
|
||||
hasTriedFetchReplaceType = true;
|
||||
|
||||
if (replaceType != null)
|
||||
type = replaceType;
|
||||
|
||||
return type;
|
||||
}
|
||||
}
|
||||
}
|
||||
11
Runtime/Drawers/IntToEnum.cs.meta
Normal file
11
Runtime/Drawers/IntToEnum.cs.meta
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: d54a749b500e802439618671a142c976
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
14
Runtime/Drawers/IntToLayer.cs
Normal file
14
Runtime/Drawers/IntToLayer.cs
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
using System;
|
||||
using UnityEngine.Scripting;
|
||||
|
||||
namespace Module.Inspector
|
||||
{
|
||||
[AttributeUsage(AttributeTargets.Field, AllowMultiple = false, Inherited = true)]
|
||||
public sealed class IntToLayer : DrawerPropertyAttribute
|
||||
{
|
||||
[Preserve]
|
||||
public IntToLayer()
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
11
Runtime/Drawers/IntToLayer.cs.meta
Normal file
11
Runtime/Drawers/IntToLayer.cs.meta
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 210d910f4eeed444e876bfedd8f6967b
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
21
Runtime/Drawers/MethodButton.cs
Normal file
21
Runtime/Drawers/MethodButton.cs
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
using System;
|
||||
using UnityEngine.Scripting;
|
||||
|
||||
namespace Module.Inspector
|
||||
{
|
||||
[AttributeUsage(AttributeTargets.Method, AllowMultiple = false, Inherited = true)]
|
||||
public sealed class MethodButton: DrawerMethodAttribute
|
||||
{
|
||||
public readonly string name;
|
||||
|
||||
[Preserve]
|
||||
public MethodButton()
|
||||
{
|
||||
}
|
||||
|
||||
public MethodButton(string name)
|
||||
{
|
||||
this.name = name;
|
||||
}
|
||||
}
|
||||
}
|
||||
11
Runtime/Drawers/MethodButton.cs.meta
Normal file
11
Runtime/Drawers/MethodButton.cs.meta
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: aa939647376a39e4dae0c9e54bba3133
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
43
Runtime/Drawers/Naming.cs
Normal file
43
Runtime/Drawers/Naming.cs
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
using System;
|
||||
|
||||
namespace Module.Inspector
|
||||
{
|
||||
[AttributeUsage(AttributeTargets.Field, AllowMultiple = false, Inherited = true)]
|
||||
public sealed class Naming : DrawerPropertyAttribute
|
||||
{
|
||||
public enum EPatternType : byte
|
||||
{
|
||||
/// <summary>
|
||||
/// Camel casing: thisIsCamelCasing
|
||||
/// </summary>
|
||||
CamelCasing,
|
||||
/// <summary>
|
||||
/// Pascal casing: ThisIsPascalCasing
|
||||
/// </summary>
|
||||
PascalCasing,
|
||||
/// <summary>
|
||||
/// Snake casing: this_is_snake_casing
|
||||
/// </summary>
|
||||
SnakeCasing,
|
||||
/// <summary>
|
||||
/// Snake casing: THIS_IS_SNAKE_CASING_WITH_ALL_CAPS
|
||||
/// </summary>
|
||||
SnakeCasingAllCaps,
|
||||
/// <summary>
|
||||
/// Kebab casing: this-is-kebab-casing
|
||||
/// </summary>
|
||||
KebabCasing,
|
||||
/// <summary>
|
||||
/// Kebab casing: THIS_IS_KEBAB_CASING_WITH_ALL_CAPS
|
||||
/// </summary>
|
||||
KebabCasingAllCaps
|
||||
}
|
||||
|
||||
public readonly EPatternType type;
|
||||
|
||||
public Naming(EPatternType type)
|
||||
{
|
||||
this.type = type;
|
||||
}
|
||||
}
|
||||
}
|
||||
11
Runtime/Drawers/Naming.cs.meta
Normal file
11
Runtime/Drawers/Naming.cs.meta
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 6f99c4aa6447ed24787b1d125c4ae6bf
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
14
Runtime/Drawers/Percentage.cs
Normal file
14
Runtime/Drawers/Percentage.cs
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
using System;
|
||||
using UnityEngine.Scripting;
|
||||
|
||||
namespace Module.Inspector
|
||||
{
|
||||
[AttributeUsage(AttributeTargets.Field, AllowMultiple = false, Inherited = true)]
|
||||
public sealed class Percentage : DrawerPropertyAttribute
|
||||
{
|
||||
[Preserve]
|
||||
public Percentage()
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
11
Runtime/Drawers/Percentage.cs.meta
Normal file
11
Runtime/Drawers/Percentage.cs.meta
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: dfe545e7a0cb02148bd45f51f9474a43
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
15
Runtime/Drawers/PopupFromConst.cs
Normal file
15
Runtime/Drawers/PopupFromConst.cs
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
using System;
|
||||
|
||||
namespace Module.Inspector
|
||||
{
|
||||
[AttributeUsage(AttributeTargets.Field, AllowMultiple = false, Inherited = true)]
|
||||
public sealed class PopupFromConst : DrawerPropertyAttribute
|
||||
{
|
||||
public readonly Type type;
|
||||
|
||||
public PopupFromConst(Type type)
|
||||
{
|
||||
this.type = type;
|
||||
}
|
||||
}
|
||||
}
|
||||
11
Runtime/Drawers/PopupFromConst.cs.meta
Normal file
11
Runtime/Drawers/PopupFromConst.cs.meta
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 9d8559005b0cb44438da12adccfcaa5a
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
14
Runtime/Drawers/QuaternionToEuler.cs
Normal file
14
Runtime/Drawers/QuaternionToEuler.cs
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
using System;
|
||||
using UnityEngine.Scripting;
|
||||
|
||||
namespace Module.Inspector
|
||||
{
|
||||
[AttributeUsage(AttributeTargets.Field, AllowMultiple = false, Inherited = true)]
|
||||
public sealed class QuaternionToEuler : DrawerPropertyAttribute
|
||||
{
|
||||
[Preserve]
|
||||
public QuaternionToEuler()
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
11
Runtime/Drawers/QuaternionToEuler.cs.meta
Normal file
11
Runtime/Drawers/QuaternionToEuler.cs.meta
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 5639ab9888faa7943b8675eb61fa7f1f
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
14
Runtime/Drawers/SceneDropdown.cs
Normal file
14
Runtime/Drawers/SceneDropdown.cs
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
using System;
|
||||
using UnityEngine.Scripting;
|
||||
|
||||
namespace Module.Inspector
|
||||
{
|
||||
[AttributeUsage(AttributeTargets.Field, AllowMultiple = false, Inherited = true)]
|
||||
public sealed class SceneDropdown : DrawerPropertyAttribute
|
||||
{
|
||||
[Preserve]
|
||||
public SceneDropdown()
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
11
Runtime/Drawers/SceneDropdown.cs.meta
Normal file
11
Runtime/Drawers/SceneDropdown.cs.meta
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: adc159b87625ef3468b0877d5c1e88d9
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
14
Runtime/Drawers/Slider.cs
Normal file
14
Runtime/Drawers/Slider.cs
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
using System;
|
||||
using UnityEngine.Scripting;
|
||||
|
||||
namespace Module.Inspector
|
||||
{
|
||||
[AttributeUsage(AttributeTargets.Field, AllowMultiple = false, Inherited = true)]
|
||||
public sealed class Slider : DrawerPropertyAttribute
|
||||
{
|
||||
[Preserve]
|
||||
public Slider()
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
11
Runtime/Drawers/Slider.cs.meta
Normal file
11
Runtime/Drawers/Slider.cs.meta
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: ac2ff972f40468140919d5b8706cabff
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
15
Runtime/Drawers/StringToField.cs
Normal file
15
Runtime/Drawers/StringToField.cs
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
using System;
|
||||
|
||||
namespace Module.Inspector
|
||||
{
|
||||
[AttributeUsage(AttributeTargets.Field, AllowMultiple = false, Inherited = true)]
|
||||
public sealed class StringToField : DrawerPropertyAttribute
|
||||
{
|
||||
public readonly Type type;
|
||||
|
||||
public StringToField(Type type)
|
||||
{
|
||||
this.type = type;
|
||||
}
|
||||
}
|
||||
}
|
||||
11
Runtime/Drawers/StringToField.cs.meta
Normal file
11
Runtime/Drawers/StringToField.cs.meta
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: dbd081def12467742a3bf05946dc5d40
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
15
Runtime/Drawers/StringToType.cs
Normal file
15
Runtime/Drawers/StringToType.cs
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
using System;
|
||||
|
||||
namespace Module.Inspector
|
||||
{
|
||||
[AttributeUsage(AttributeTargets.Field, AllowMultiple = false, Inherited = true)]
|
||||
public sealed class StringToType : DrawerPropertyAttribute
|
||||
{
|
||||
public readonly Type assignableFrom;
|
||||
|
||||
public StringToType(Type assignableFrom)
|
||||
{
|
||||
this.assignableFrom = assignableFrom;
|
||||
}
|
||||
}
|
||||
}
|
||||
11
Runtime/Drawers/StringToType.cs.meta
Normal file
11
Runtime/Drawers/StringToType.cs.meta
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 7870b2ad7f2ad67469d6787848cc70de
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
14
Runtime/Drawers/UrlGoTo.cs
Normal file
14
Runtime/Drawers/UrlGoTo.cs
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
using System;
|
||||
using UnityEngine.Scripting;
|
||||
|
||||
namespace Module.Inspector
|
||||
{
|
||||
[AttributeUsage(AttributeTargets.Field, AllowMultiple = false, Inherited = true)]
|
||||
public sealed class UrlGoTo : DrawerPropertyAttribute
|
||||
{
|
||||
[Preserve]
|
||||
public UrlGoTo()
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
11
Runtime/Drawers/UrlGoTo.cs.meta
Normal file
11
Runtime/Drawers/UrlGoTo.cs.meta
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: ac9efabc5f0547f43921c2804bb85220
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Loading…
Add table
Add a link
Reference in a new issue