From cc9a845b643ffb4a9abe4f7da787ac5c5b14dae8 Mon Sep 17 00:00:00 2001 From: Pascal Serrarens Date: Thu, 23 Apr 2026 12:17:05 +0200 Subject: [PATCH] Fix sleeping for product combinator --- Runtime/Scripts/Core/Neuron.cs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Runtime/Scripts/Core/Neuron.cs b/Runtime/Scripts/Core/Neuron.cs index 8e47dc8..d0f9473 100644 --- a/Runtime/Scripts/Core/Neuron.cs +++ b/Runtime/Scripts/Core/Neuron.cs @@ -222,11 +222,10 @@ namespace NanoBrain { public void SleepCheck() { if (this.isSleeping) { #if UNITY_MATHEMATICS - this.bias = new float3(0, 0, 0); + this._outputValue = new float3(0, 0, 0); #else - this.bias = new Vector3(0,0,0); + this._outputValue = new Vector3(0,0,0); #endif - this._outputValue = this.bias; } } @@ -526,12 +525,13 @@ namespace NanoBrain { public virtual void RemoveReceiver(Nucleus receiverToRemove) { this._receivers.RemoveAll(receiver => receiver == receiverToRemove); receiverToRemove.synapses.RemoveAll(synapse => synapse.neuron == this); - } + } #endregion Receivers - public override void ProcessStimulus(Vector3 inputValue) {; + public override void ProcessStimulus(Vector3 inputValue) { + ; this.lastUpdate = Time.time; this.bias = inputValue; this.parent.UpdateFromNucleus(this);