/// <summary> /// /// </summary> private void Awake() { _currentStack = _model.Stack; _currentGenerationData = new CellStackData[_genSize]; _population.Reset(); InitializeMatingPool(); string filepath = Application.dataPath + "/00-DataOutput"; string dateAndTimeVar = System.DateTime.Now.ToString("yyyy_MM_dd_HH_mm_ss"); filepath += "/" + dateAndTimeVar; filePath = filepath; System.IO.Directory.CreateDirectory(filePath); //ONLY IF USING GENES FOR PARTIAL IMAGE SEEDS - synthesize 4 images from child genes - don't use this if you dont have genes for image textures if (_SeedFromGenes == true) { Texture2D texture1 = _seeds[_currentStack.DNA.GetGene(0)]; Texture2D texture2 = _seeds[_currentStack.DNA.GetGene(1)]; Texture2D texture3 = _seeds[_currentStack.DNA.GetGene(2)]; Texture2D texture4 = _seeds[_currentStack.DNA.GetGene(3)]; Texture2D combined = ImageSynthesizer.CombineFour(texture1, texture2, texture3, texture4, _currentStack.RowCount, _currentStack.ColumnCount); //place the synthesized image into the stack _currentStack.SetSeed(combined); //resets/initializes the model using the synthesized image _model.ResetModel(combined); //place the synthesized image into the stack _currentStack.SetSeed(combined); _analyser.ResetAnalysis(); } }
/// <summary> /// /// </summary> private void Awake() { _currentStack = _model.Stack; _currentGeneration = new CellStack[_genSize]; _population.Reset(); InitializeMatingPool(); }