public static void Open(Inventory inventory) { InventoryEditorWindow window = GetWindow <InventoryEditorWindow>("Inventory Tester"); window.minSize = new Vector2(800, 300); window.serializedObject = new SerializedObject(inventory); Inventory = inventory; }
public override void OnInspectorGUI() { base.OnInspectorGUI(); if (GUILayout.Button("Open Inventory Tester")) { InventoryEditorWindow.Open(inventory); } }