Пример #1
0
        public static void SelectInstance(string Type, object Instance)
        {
            InspectorContainer NewContainer = (InspectorContainer)ScriptableObject.CreateInstance(typeof(InspectorContainer));

            NewContainer.ClassType = Type;
            NewContainer.Instance  = Instance;

            UpdateCurrentDelegate(Type);

            Selection.activeObject = null;

            Selection.activeObject = NewContainer;
        }
Пример #2
0
        public override void OnInspectorGUI()
        {
            InspectorContainer Target = ((InspectorContainer)target);

            if (Target.ClassType != CurrentType)
            {
                UpdateCurrentDelegate(Target.ClassType);
            }

            if (CurrentDelegate != null)
            {
                CurrentDelegate(Target.Instance);
            }

            if (InspectableObject.bRepaint)
            {
                Repaint();

                InspectableObject.bRepaint = false;
            }
        }