public static void saveCurrentConfig() { EntityManager man = GameObject.FindObjectOfType <EntityManager>(); ConfigSO newSO = (ConfigSO)ScriptableObjectUtility.CreateAsset <ConfigSO> (man.currentConfigName); newSO.GetStats(man); AssetDatabase.SaveAssets(); AssetDatabase.Refresh(); }
void ActualizeDataFromScriptableObject() { if (loadScriptableObject != null) { currentConfigName = loadScriptableObject.name; description = loadScriptableObject.description; mapSize = loadScriptableObject.mapSize; entitiesFromStart = loadScriptableObject.entitiesFromStart; entitiesSpawnRate = loadScriptableObject.entitiesSpawnRate; eatMode = loadScriptableObject.eatMode; eatValue = loadScriptableObject.eatValue; canOutnumberMaxEnergy = loadScriptableObject.canOutnumberMaxEnergy; activateSpawn = loadScriptableObject.activateSpawn; spawnTime = loadScriptableObject.spawnTime; darwinEvolution = loadScriptableObject.darwinEvolution; loadScriptableObject = null; } }