Adding alignment

This commit is contained in:
Pascal Serrarens 2026-07-06 17:36:35 +02:00
parent fa78dcddb5
commit d72f15eb66
3 changed files with 4 additions and 3 deletions

View File

@ -15,6 +15,7 @@ namespace NanoBrain.Unity {
void OnEnable() { void OnEnable() {
clusterPrefab = (ClusterPrefab)target; clusterPrefab = (ClusterPrefab)target;
clusterPrefab.cluster.name = clusterPrefab.name;
view = ClusterView.GetClusterView(serializedObject); view = ClusterView.GetClusterView(serializedObject);
view.currentCluster ??= clusterPrefab.cluster; view.currentCluster ??= clusterPrefab.cluster;
view.currentNucleus = clusterPrefab.cluster.defaultOutput; view.currentNucleus = clusterPrefab.cluster.defaultOutput;
@ -378,7 +379,7 @@ namespace NanoBrain.Unity {
} }
protected virtual void AddNeuronInput(Nucleus nucleus) { 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"); //Neuron newNeuroid = new(this.prefab.cluster, "New neuron");
newNeuron.AddReceiver(nucleus); newNeuron.AddReceiver(nucleus);
this.view.currentNucleus = newNeuron; this.view.currentNucleus = newNeuron;

View File

@ -768,7 +768,7 @@ namespace NanoBrain {
if (nucleus is not Cluster cluster) if (nucleus is not Cluster cluster)
continue; continue;
List<Nucleus> receivers = cluster.CollectReceivers(); List<Nucleus> receivers = cluster.CollectReceivers();
Debug.Log($"cluster receiver count = {receivers.Count}"); //Debug.Log($"cluster receiver count = {receivers.Count}");
if (receivers.Count == 0) if (receivers.Count == 0)
this.nuclei.Remove(nucleus); this.nuclei.Remove(nucleus);
} }

View File

@ -21,7 +21,7 @@ namespace NanoBrain {
/// The cluster instance in which the nucleus is located /// The cluster instance in which the nucleus is located
/// </summary> /// </summary>
[SerializeReference] [SerializeReference]
[HideInInspector] //[HideInInspector]
public Cluster parent; public Cluster parent;
/// <summary> /// <summary>