コード例 #1
0
    public override void OnInspectorGUI()
    {
        GeneticMixer mixer = (GeneticMixer)target;

        mixer.generationSize = EditorGUILayout.IntSlider("Generation Size", mixer.generationSize, 1, 30);
        mixer.mutationRate   = EditorGUILayout.Slider("Mutation Rate", mixer.mutationRate, 0, 1.0f);

        mixer.mutationOptions = (MutationOptions)EditorGUILayout.EnumPopup(mixer.mutationOptions);
        mixer.noRegression    = EditorGUILayout.Toggle("No Regression", mixer.noRegression);
    }
コード例 #2
0
 bool FindAttachedMixer(GameObject target)
 {
     mixer = target.GetComponent <GeneticMixer>();
     if (mixer != null)
     {
         return(true);
     }
     Debug.Log("mixer not found");
     return(false);
 }
コード例 #3
0
 public bool ConnectWithController(NeuralController controller, out GeneticMixer mixer)
 {
     this.controller = controller;
     mixer           = this;
     return(true);
 }