protected void Start() { texture.Initialize(); float feedKillRadius = .005f; float abRatesRadius = .00001f; if (randomizer == null) { randomizer = ScriptableObject.CreateInstance <RDPresetRandomizer> (); //randomizer.InitAroundBase ( Parameters, regionRadius ); randomizer.InitAroundBase(Parameters, new PV[] { new PV("convCell", 0f), new PV("convAdj", 0f), new PV("convDiag", 0f), new PV("feedRate", feedKillRadius), new PV("killRate", feedKillRadius), new PV("aRate", abRatesRadius), new PV("bRate", abRatesRadius), new PV("deltaTime", 0f) }); } feedKillData = new DynamicData(string.Format("regionRadius={0},regionRadiusBackup={0}!", feedKillRadius)); ABRatesData = new DynamicData(string.Format("regionRadius={0},regionRadiusBackup={0}!", feedKillRadius)); m_RegionBackup = Parameters.Copy(); }
public void Randomize() { if (m_PresetUnique == false) { Parameters = Instantiate <RDPreset> (_parameters); } if (randomizer == null) { randomizer = ScriptableObject.CreateInstance <RDPresetRandomizer> (); } randomizer.Apply(_parameters); texture.Initialize(); needsUpdate = true; }