diff --git a/Editor/ClusterEditor.cs b/Editor/ClusterEditor.cs index e3a1995..7cc4f44 100644 --- a/Editor/ClusterEditor.cs +++ b/Editor/ClusterEditor.cs @@ -15,6 +15,7 @@ namespace NanoBrain.Unity { void OnEnable() { clusterPrefab = (ClusterPrefab)target; + clusterPrefab.cluster.name = clusterPrefab.name; view = ClusterView.GetClusterView(serializedObject); view.currentCluster ??= clusterPrefab.cluster; view.currentNucleus = clusterPrefab.cluster.defaultOutput; @@ -378,7 +379,7 @@ namespace NanoBrain.Unity { } protected virtual void AddNeuronInput(Nucleus nucleus) { - Neuron newNeuron = new(this.view.currentCluster, "New Neuron"); + Neuron newNeuron = new(this.view.currentNucleus.parent, "New Neuron"); //Neuron newNeuroid = new(this.prefab.cluster, "New neuron"); newNeuron.AddReceiver(nucleus); this.view.currentNucleus = newNeuron; diff --git a/Runtime/Scripts/Core/Cluster.cs b/Runtime/Scripts/Core/Cluster.cs index e93b7e4..e706e83 100644 --- a/Runtime/Scripts/Core/Cluster.cs +++ b/Runtime/Scripts/Core/Cluster.cs @@ -768,7 +768,7 @@ namespace NanoBrain { if (nucleus is not Cluster cluster) continue; List receivers = cluster.CollectReceivers(); - Debug.Log($"cluster receiver count = {receivers.Count}"); + //Debug.Log($"cluster receiver count = {receivers.Count}"); if (receivers.Count == 0) this.nuclei.Remove(nucleus); } diff --git a/Runtime/Scripts/Core/Nucleus.cs b/Runtime/Scripts/Core/Nucleus.cs index a93c153..9b7fda3 100644 --- a/Runtime/Scripts/Core/Nucleus.cs +++ b/Runtime/Scripts/Core/Nucleus.cs @@ -21,7 +21,7 @@ namespace NanoBrain { /// The cluster instance in which the nucleus is located /// [SerializeReference] - [HideInInspector] + //[HideInInspector] public Cluster parent; ///