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/AIExample38_Constructor.cs | |
parent | e846c64d6f927879cb8a095e62d773a8d7b3c9f4 (diff) |
-advanced inspector 对2018兼容性不太好,改用Odin
Diffstat (limited to 'Assets/ThirdParty/AdvancedInspector/Examples/CSharp/AIExample38_Constructor.cs')
-rw-r--r-- | Assets/ThirdParty/AdvancedInspector/Examples/CSharp/AIExample38_Constructor.cs | 36 |
1 files changed, 0 insertions, 36 deletions
diff --git a/Assets/ThirdParty/AdvancedInspector/Examples/CSharp/AIExample38_Constructor.cs b/Assets/ThirdParty/AdvancedInspector/Examples/CSharp/AIExample38_Constructor.cs deleted file mode 100644 index 27cadeb3..00000000 --- a/Assets/ThirdParty/AdvancedInspector/Examples/CSharp/AIExample38_Constructor.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -using UnityEngine; -using AdvancedInspector; - -public class AIExample38_Constructor : MonoBehaviour -{ - // In some case, you may want a class to have a custom constructor. - // Usually, Unity is unable to invoke that constructor. - [Serializable] - public class CustomConstructor - { - [Inspect] - public string value; - - public CustomConstructor(string text) - { - value = text; - } - } - - // Advanced Inspector allows you to create your own instance using the constructor attribute. - // You may setup your object as you wish before returning it. - [Inspect, Constructor("InvokeConstructor")] - public CustomConstructor[] constructors; - - public CustomConstructor InvokeConstructor() - { - return new CustomConstructor("This was added in a constructor"); - } -} - - |