Beispiel #1
0
        private static void ReflectionMonoBehaviourInspector(MenuCommand command)
        {
            Object context = command.context;

            Component target = context as Component;

            ReflectionMonoBehaviour reflectionMonoBehaviour = target.gameObject.AddComponent <ReflectionMonoBehaviour>();

            reflectionMonoBehaviour.target = target;
        }
Beispiel #2
0
        void Refresh()
        {
            if (target == null)
            {
                return;
            }

            if (instance == null)
            {
                instance = target as ReflectionMonoBehaviour;
            }

            if (editorInstance == null)
            {
                editorInstance = new EditorInstance(instance.target);
            }
        }