diff --git a/Runtime/Scripts/Core/Neuron.cs b/Runtime/Scripts/Core/Neuron.cs index 7d8005a..06d630e 100644 --- a/Runtime/Scripts/Core/Neuron.cs +++ b/Runtime/Scripts/Core/Neuron.cs @@ -174,6 +174,8 @@ namespace NanoBrain { #if UNITY_MATHEMATICS + private readonly List fs = new(); + /// /// The output value of the neuron /// @@ -183,7 +185,11 @@ namespace NanoBrain { /// The output value of the neuron /// public virtual float3 outputValue { - get { return _outputValue; } + get { + foreach (var f in fs) + f(); + return _outputValue; + } set { _outputValue = value; if (this.isFiring)