Ejemplo n.º 1
0
        public void SetEnum()
        {
            spawnPointEnum = Resources.Load <ScriptableUSEnumList>("ConfigFiles/EnumLists/SpawnPointEnum");
            positionEnum   = Resources.Load <ScriptableUSEnumList>("ConfigFiles/EnumLists/PositionEnum");

            Fixed       = Resources.Load <ScriptableUSEnum>("ConfigFiles/EnumValues/Fixed");
            RandomFixed = Resources.Load <ScriptableUSEnum>("ConfigFiles/EnumValues/RandomFixed");
            RandomRange = Resources.Load <ScriptableUSEnum>("ConfigFiles/EnumValues/RandomRange");
        }
Ejemplo n.º 2
0
		static void CreateBasicLists() {

			string path = "Assets/UltimateSpawner/Core/Resources/ConfigFiles/EnumLists/";
			string extension = ".asset";

			foreach (var defaultList in defaultLists) {
				if (AssetDatabase.LoadAssetAtPath(path + defaultList + extension, typeof(ScriptableUSEnumList)) == null) {
					ScriptableUSEnumList defaultEnumList = ScriptableObject.CreateInstance<ScriptableUSEnumList>();
					defaultEnumList.name = defaultList;
					
					AssetDatabase.CreateAsset(defaultEnumList, path + defaultList + extension);

					// Print the path of the created asset
					Debug.Log(AssetDatabase.GetAssetPath(defaultEnumList));
				}
			}
			
		}