예제 #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");
        }
예제 #2
0
//		[MenuItem("Tools/UltimateSpawner/Create Enums File")]
		static void CreateBasicEnums() {

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

			foreach (var defaultEnum in defaultEnums) {
				if (AssetDatabase.LoadAssetAtPath(path + defaultEnum + extension, typeof(ScriptableUSEnum)) == null) {
					ScriptableUSEnum scriptableEnum = ScriptableObject.CreateInstance<ScriptableUSEnum>();
					scriptableEnum.name = defaultEnum;
					AssetDatabase.CreateAsset(scriptableEnum, path + defaultEnum + extension);
					
					// Print the path of the created asset
					Debug.Log(AssetDatabase.GetAssetPath(scriptableEnum));
				}
			}
			
		}
예제 #3
0
 void OnEnable()
 {
     Fixed       = Resources.Load <ScriptableUSEnum>("ConfigFiles/EnumValues/Fixed");
     RandomFixed = Resources.Load <ScriptableUSEnum>("ConfigFiles/EnumValues/RandomFixed");
     RandomRange = Resources.Load <ScriptableUSEnum>("ConfigFiles/EnumValues/RandomRange");
 }