Add function call option when getting output

This commit is contained in:
Pascal Serrarens 2026-08-13 17:19:36 +02:00
parent cde3a0f4d3
commit abd337f1dd

View File

@ -174,6 +174,8 @@ namespace NanoBrain {
#if UNITY_MATHEMATICS
private readonly List<Action> fs = new();
/// <summary>
/// The output value of the neuron
/// </summary>
@ -183,7 +185,11 @@ namespace NanoBrain {
/// The output value of the neuron
/// </summary>
public virtual float3 outputValue {
get { return _outputValue; }
get {
foreach (var f in fs)
f();
return _outputValue;
}
set {
_outputValue = value;
if (this.isFiring)