Let go food only at home
This commit is contained in:
parent
62bacfb1c0
commit
94df545222
@ -92,14 +92,13 @@ namespace NanoBrain.Unity {
|
|||||||
if (property.serializedObject.targetObjects.Length == 1) {
|
if (property.serializedObject.targetObjects.Length == 1) {
|
||||||
UnityEngine.Object targetObject = property.serializedObject.targetObject;
|
UnityEngine.Object targetObject = property.serializedObject.targetObject;
|
||||||
Cluster_Drawer.selectedTarget = targetObject;
|
Cluster_Drawer.selectedTarget = targetObject;
|
||||||
|
|
||||||
Cluster cluster;
|
Cluster cluster;
|
||||||
if (clusterView.initialized || Application.isPlaying) {
|
if (clusterView.initialized || Application.isPlaying) {
|
||||||
cluster = SerializedPropertyUtility.GetManagedObjectForProperty(targetObject, property.propertyPath) as Cluster;
|
cluster = SerializedPropertyUtility.GetManagedObjectForProperty(targetObject, property.propertyPath) as Cluster;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
// This does not work properly yet it seems
|
// This does not work properly yet it seems
|
||||||
Debug.Log("Instantiate");
|
|
||||||
ClusterPrefab clusterPrefab = prefabProp.objectReferenceValue as ClusterPrefab;
|
ClusterPrefab clusterPrefab = prefabProp.objectReferenceValue as ClusterPrefab;
|
||||||
cluster = new(clusterPrefab);
|
cluster = new(clusterPrefab);
|
||||||
object parent = SerializedPropertyUtility.GetParentObjectAndMember(targetObject, property.propertyPath, out var memberInfo, out int outIndex);
|
object parent = SerializedPropertyUtility.GetParentObjectAndMember(targetObject, property.propertyPath, out var memberInfo, out int outIndex);
|
||||||
@ -140,7 +139,7 @@ namespace NanoBrain.Unity {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static void OnSceneGUI(SceneView sceneView) {
|
private static void OnSceneGUI(SceneView sceneView) {
|
||||||
if (selectedTarget == null)
|
if (Application.isPlaying == false || selectedTarget == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
GameObject gameObject = null;
|
GameObject gameObject = null;
|
||||||
|
|||||||
@ -380,7 +380,7 @@ namespace NanoBrain {
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Time in seconds after the last update the neuron can go to sleep
|
/// Time in seconds after the last update the neuron can go to sleep
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static readonly float timeToSleep = 1f;
|
public static readonly float timeToSleep = 0.5f;
|
||||||
|
|
||||||
public bool breakOnUpdate = false;
|
public bool breakOnUpdate = false;
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user