diff --git a/Assets/MackySoft/MackySoft.SerializeReferenceExtensions/Example/ExampleAssets/Scripts/Runtime/Example.cs b/Assets/MackySoft/MackySoft.SerializeReferenceExtensions/Example/ExampleAssets/Scripts/Runtime/Example.cs index 19bed32..570c109 100644 --- a/Assets/MackySoft/MackySoft.SerializeReferenceExtensions/Example/ExampleAssets/Scripts/Runtime/Example.cs +++ b/Assets/MackySoft/MackySoft.SerializeReferenceExtensions/Example/ExampleAssets/Scripts/Runtime/Example.cs @@ -8,64 +8,64 @@ using UnityEngine; namespace MackySoft.SerializeReferenceExtensions.Example { - public class Example : MonoBehaviour { + public class Example : MonoBehaviour { - // The type that implements ICommand will be displayed in the popup. - [SerializeReference, SubclassSelector] - ICommand m_Command; + // The type that implements ICommand will be displayed in the popup. + [SerializeReference, SubclassSelector] + ICommand m_Command; - // Collection support - [SerializeReference, SubclassSelector] - ICommand[] m_Commands = Array.Empty(); + // Collection support + [SerializeReference, SubclassSelector] + ICommand[] m_Commands = Array.Empty(); void Start () { - m_Command?.Execute(); + m_Command?.Execute(); - foreach (ICommand command in m_Commands) { - command?.Execute(); + foreach (ICommand command in m_Commands) { + command?.Execute(); } } - // Nested type support + // Nested type support [Serializable] - public class NestedCommand : ICommand { - public void Execute () { - Debug.Log("Execute NestedCommand"); + public class NestedCommand : ICommand { + public void Execute () { + Debug.Log("Execute NestedCommand"); } } - } - - public interface ICommand { - void Execute (); } - [Serializable] - public class DebugCommand : ICommand { - [SerializeField] - string m_Message; - public void Execute () { - Debug.Log(m_Message); + public interface ICommand { + void Execute (); + } + + [Serializable] + public class DebugCommand : ICommand { + [SerializeField] + string m_Message; + public void Execute () { + Debug.Log(m_Message); } } - [Serializable] - public class InstantiateCommand : ICommand { + [Serializable] + public class InstantiateCommand : ICommand { - [SerializeField] + [SerializeField] GameObject m_Prefab; public void Execute () { - UnityEngine.Object.Instantiate(m_Prefab,Vector3.zero,Quaternion.identity); + UnityEngine.Object.Instantiate(m_Prefab,Vector3.zero,Quaternion.identity); } } - // Menu override support - [AddTypeMenu("Example/Add Type Menu Command")] - [Serializable] - public class AddTypeMenuCommand : ICommand { - public void Execute () { - Debug.Log("Execute AddTypeMenuCommand"); + // Menu override support + [AddTypeMenu("Example/Add Type Menu Command")] + [Serializable] + public class AddTypeMenuCommand : ICommand { + public void Execute () { + Debug.Log("Execute AddTypeMenuCommand"); } }