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; }
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; } }