diff --git a/Editor/ClusterInspector.cs b/Editor/ClusterInspector.cs index b597132..0b28264 100644 --- a/Editor/ClusterInspector.cs +++ b/Editor/ClusterInspector.cs @@ -794,7 +794,17 @@ public class ClusterInspector : Editor { } EditorGUI.indentLevel++; - synapse.weight = EditorGUILayout.FloatField("Weight", synapse.weight); + float newWeight = EditorGUILayout.FloatField("Weight", synapse.weight); + if (newWeight != synapse.weight) { + if (synapse.nucleus is IReceptor receptor) { + Nucleus[] receptorArray = receptor.nucleiArray; + foreach (Synapse s in this.currentNucleus.synapses) { + if (s.nucleus is IReceptor r && r.nucleiArray == receptorArray) + s.weight = newWeight; + } + } else + synapse.weight= newWeight; + } EditorGUI.indentLevel--; } }