static void Init() { EditorWindow.GetWindow(typeof(UIManagerEditor)); headTexture = Resources.Load <Texture>("EditorWindowTextures/headTexture"); skypeTexture = Resources.Load <Texture>("EditorWindowTextures/skypeIcon"); emailTexture = Resources.Load <Texture>("EditorWindowTextures/emailIcon"); folderIcon = Resources.Load <Texture>("EditorWindowTextures/folderIcon"); Object itemDatabase = Resources.Load("ItemDataBase"); if (itemDatabase == null) { itemDatabaseList = CreateItemDataBase.createItemDatabase(); } else { itemDatabaseList = (ItemDataBaseList)Resources.Load("ItemDatabase"); } Object attributeDatabase = Resources.Load("AttributeDatabase"); if (attributeDatabase == null) { itemAttributeList = CreateAttributeDatabase.createItemAttributeDatabase(); } else { itemAttributeList = (ItemAttributeList)Resources.Load("AttributeDatabase"); } Object inputManager = Resources.Load("InputManager"); }
static void Init() { EditorWindow.GetWindow(typeof(IM_Manager)); headTexture = Resources.Load<Texture>("EditorWindowTextures/headTexture"); skypeTexture = Resources.Load<Texture>("EditorWindowTextures/skype-icon"); emailTexture = Resources.Load<Texture>("EditorWindowTextures/email-icon"); folderIcon = Resources.Load<Texture>("EditorWindowTextures/folder-icon"); Object itemDatabase = Resources.Load("ItemDatabase"); if (itemDatabase == null) inventoryItemList = CreateItemDatabase.createItemDatabase(); else inventoryItemList = (ItemDataBaseList)Resources.Load("ItemDatabase"); Object attributeDatabase = Resources.Load("AttributeDatabase"); if (attributeDatabase == null) itemAttributeList = CreateAttributeDatabase.createItemAttributeDatabase(); else itemAttributeList = (ItemAttributeList)Resources.Load("AttributeDatabase"); Object inputManager = Resources.Load("InputManager"); if (inputManager == null) inputManagerDatabase = CreateInputManager.createInputManager(); else inputManagerDatabase = (InputManager)Resources.Load("InputManager"); }
public static ItemAttributeList createItemAttributeDatabase() { asset = ScriptableObject.CreateInstance <ItemAttributeList>(); AssetDatabase.CreateAsset(asset, "Assets/C#MyUnityLib/Resources/AttributeDatabase.asset"); AssetDatabase.SaveAssets(); return(asset); }
public static ItemAttributeList asset; //The List of all Items #endregion Fields #if UNITY_EDITOR //creates a new ItemDatabase(new instance) public static ItemAttributeList createItemAttributeDatabase() { asset = ScriptableObject.CreateInstance<ItemAttributeList>(); //of the ScriptableObject InventoryItemList AssetDatabase.CreateAsset(asset, "Assets/InventoryMaster/Resources/AttributeDatabase.asset"); //in the Folder Assets/Resources/ItemDatabase.asset AssetDatabase.SaveAssets(); //and than saves it there return asset; }
public static ItemAttributeList createItemAttributeDatabase() { asset = ScriptableObject.CreateInstance<ItemAttributeList>(); AssetDatabase.CreateAsset(asset, "Assets/InventoryMaster/Resources/AttributeDatabase.asset"); AssetDatabase.SaveAssets(); return asset; }
public static ItemAttributeList asset; //The List of all Items #if UNITY_EDITOR public static ItemAttributeList createItemAttributeDatabase() //creates a new ItemDatabase(new instance) { asset = ScriptableObject.CreateInstance <ItemAttributeList>(); //of the ScriptableObject InventoryItemList AssetDatabase.CreateAsset(asset, "Assets/InventoryMaster/Resources/AttributeDatabase.asset"); //in the Folder Assets/Resources/ItemDatabase.asset AssetDatabase.SaveAssets(); //and than saves it there return(asset); }
static void Init() { GetWindow(typeof(ItemManager)); Object itemDatabase = Resources.Load("ItemDatabase"); if (itemDatabase == null) inventoryItemList = CreateItemDatabase.createItemDatabase(); else inventoryItemList = (ItemDataBaseList)Resources.Load("ItemDatabase"); Object attributeDatabase = Resources.Load("AttributeDatabase"); if (attributeDatabase == null) itemAttributeList = CreateAttributeDatabase.createItemAttributeDatabase(); else itemAttributeList = (ItemAttributeList)Resources.Load("AttributeDatabase"); Object inputManager = Resources.Load("InputManager"); if (inputManager == null) inputManagerDatabase = CreateInputManager.createInputManager(); else inputManagerDatabase = (InputManager)Resources.Load("InputManager"); }
void OnEnable() { attributes = new ItemAttributeList(this); }
public override void OnInspectorGUI() { ItemAttributeList myItemAttributeList = (ItemAttributeList)target; EditorGUILayout.IntField("Size", myItemAttributeList.list.Count); }