diff options
author | chai <chaifix@163.com> | 2020-10-15 13:53:27 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2020-10-15 13:53:27 +0800 |
commit | 6990a0d1fbdcbbf404f40713363ac1a148c8840a (patch) | |
tree | cbd92c7a47e12c30cba3300eb349d9c43ce512ab /Assets/ThirdParty/AdvancedInspector/Examples/CSharp/AIExample8_Enum.cs | |
parent | e846c64d6f927879cb8a095e62d773a8d7b3c9f4 (diff) |
-advanced inspector 对2018兼容性不太好,改用Odin
Diffstat (limited to 'Assets/ThirdParty/AdvancedInspector/Examples/CSharp/AIExample8_Enum.cs')
-rw-r--r-- | Assets/ThirdParty/AdvancedInspector/Examples/CSharp/AIExample8_Enum.cs | 42 |
1 files changed, 0 insertions, 42 deletions
diff --git a/Assets/ThirdParty/AdvancedInspector/Examples/CSharp/AIExample8_Enum.cs b/Assets/ThirdParty/AdvancedInspector/Examples/CSharp/AIExample8_Enum.cs deleted file mode 100644 index ae8426e2..00000000 --- a/Assets/ThirdParty/AdvancedInspector/Examples/CSharp/AIExample8_Enum.cs +++ /dev/null @@ -1,42 +0,0 @@ -using UnityEngine; -using System.Collections; - -using AdvancedInspector; - -[AdvancedInspector] -public class AIExample8_Enum : MonoBehaviour -{ - [Inspect] - public MyEnum normalEnum; - - // The enum attribute is used to control how an enum is displayed. - // The first parameter is a switch between a normal 1-choice enum, and a masked enum. - [Inspect, Enum(true)] - public MyEnum maskedEnum; - - // An enum can also be display as checkboxes or buttons - [Inspect, Enum(EnumDisplay.Checkbox)] - public MyEnum checkboxEnum; - - [Inspect] - public ByteEnum byteEnum; -} - -public enum MyEnum -{ - // Masked enum - or bitfield - must follow a bitwise values. (1, 2, 4, 8, 16, 32, 64, etc) - // Otherwise the bitfield cannot be save properly. - // Unity has issue with a masked value of an enum having a 0 value. - // None = 0, - FirstValue = 1, - SecondValue = 2, - ThirdValue = 4, - ForthValue = 8 -} - -public enum ByteEnum : byte -{ - One = 1, - Two = 2, - Three = 3 -}
\ No newline at end of file |