public override void OnInspectorGUI() { DrawDefaultInspector(); ItemDatabase database = (ItemDatabase)target; if (GUILayout.Button("Modify this Item Database")) { ItemDatabaseWindow.ShowWindow(database); } }
static void init() { hub = new DatabaseHub(); resourcesList = Resources.Load <ResourcesList>(ScriptableObjectConstant.resourceListPath); enemyDatabaseWindow = new EnemyDatabaseWindow(); enemyDatabaseWindow.initDB(resourcesList); abilityDatabaseWindow = new AbilityDatabaseWindow(); abilityDatabaseWindow.initDB(resourcesList); itemDatabaseWindow = new ItemDatabaseWindow(); itemDatabaseWindow.initDB(resourcesList); hub.minSize = new Vector2(300 * 3, 300); hub.Show(); }