Insect rig improvements
This commit is contained in:
parent
b6a3bc1892
commit
22ee17c49f
@ -99,7 +99,9 @@ namespace NanoBrain {
|
|||||||
|
|
||||||
public void SetGraph(GameObject gameObject) {
|
public void SetGraph(GameObject gameObject) {
|
||||||
this.gameObject = gameObject;
|
this.gameObject = gameObject;
|
||||||
|
if (this.currentCluster == null)
|
||||||
|
return;
|
||||||
|
|
||||||
if (Application.isPlaying == false)
|
if (Application.isPlaying == false)
|
||||||
this.serializedBrain = new SerializedObject(this.currentCluster.prefab);
|
this.serializedBrain = new SerializedObject(this.currentCluster.prefab);
|
||||||
this.selectedOutput = this.currentCluster.outputs[0];
|
this.selectedOutput = this.currentCluster.outputs[0];
|
||||||
@ -121,7 +123,7 @@ namespace NanoBrain {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void OnIMGUI() {
|
public void OnIMGUI() {
|
||||||
if (Application.isPlaying == false)
|
if (Application.isPlaying == false && serializedBrain != null)
|
||||||
serializedBrain.Update();
|
serializedBrain.Update();
|
||||||
|
|
||||||
Handles.BeginGUI();
|
Handles.BeginGUI();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user