From abd337f1dd99844b56a02118d863739ef209e425 Mon Sep 17 00:00:00 2001 From: Pascal Serrarens Date: Thu, 13 Aug 2026 17:19:36 +0200 Subject: [PATCH] Add function call option when getting output --- Runtime/Scripts/Core/Neuron.cs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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)