コード例 #1
0
ファイル: InspectorPicker.cs プロジェクト: fbizuneh/Igor
        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
ファイル: InspectorPicker.cs プロジェクト: fbizuneh/Igor
        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;
            }
        }