From e4ba7f8497c9651b8229f300c4981df8c1e9217c Mon Sep 17 00:00:00 2001 From: Pascal Serrarens Date: Thu, 23 Apr 2026 11:55:17 +0200 Subject: [PATCH] Better cross-cluster monitoring --- Editor/ClusterViewer.cs | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/Editor/ClusterViewer.cs b/Editor/ClusterViewer.cs index fabe732..af0eb48 100644 --- a/Editor/ClusterViewer.cs +++ b/Editor/ClusterViewer.cs @@ -727,15 +727,8 @@ namespace NanoBrain { protected void OnNeuronClick(Nucleus nucleus) { if (nucleus == this.currentNucleus) { if (Application.isPlaying) { - if (nucleus is Cluster cluster) { - if (expandArray) { - this.currentNucleus = cluster.defaultOutput; - if (this.currentNucleus is Neuron neuron && neuron.receivers.Count == 0) - this.selectedOutput = this.currentNucleus; expandArray = false; - } - else - expandArray = !expandArray; - } + if (nucleus is Cluster) + expandArray = !expandArray; else expandArray = false; } @@ -746,9 +739,17 @@ namespace NanoBrain { } else if (nucleus.parent != null && this.currentNucleus != null && nucleus.parent != this.currentNucleus.parent) { // We go to a different cluster - // select the cluster, not the neuron in the cluster - this.currentNucleus = nucleus.parent; - expandArray = false; + if (Application.isPlaying) { + this.currentNucleus = nucleus; + if (this.currentNucleus is Neuron neuron && neuron.receivers.Count == 0) + this.selectedOutput = this.currentNucleus; + expandArray = false; + } + else { + // select the cluster, not the neuron in the cluster + this.currentNucleus = nucleus.parent; + expandArray = false; + } } else { this.currentNucleus = nucleus;