public override void OnInspectorGUI() { DrawDefaultInspector(); NEATGraph myTarget = (NEATGraph)target; bool drawRandom; bool reset; bool drawGivenGenome; GUILayout.BeginHorizontal(); drawRandom = GUILayout.Button("Draw random"); drawGivenGenome = GUILayout.Button("Draw given"); reset = GUILayout.Button("Reset"); GUILayout.EndHorizontal(); if (drawRandom) { myTarget.DrawRandomFromParameters(); } else if (drawGivenGenome) { myTarget.DrawGivenGenomeProxy(); } else if (reset) { myTarget.RemoveAllNodes(); } }
private void Start() { instance = this; if (autoUpdate) { StartCoroutine(update()); } }
private void Start() { smoothFollow = FindObjectOfType <SmoothFollow>(); neatGraph = FindObjectOfType <NEATGraph>(); }