Reaction works even without making [Atom] #32
slimshader
started this conversation in
General
Replies: 1 comment 1 reply
-
Yes, this is intended behavior
For example, here if you do not specify the using UniMob;
using UnityEngine;
public class AtomCaching : LifetimeMonoBehaviour
{
[Atom] public int A { get; set; }
[Atom] public int B { get; set; }
/*[Atom]*/ public int Computed
{
get
{
Debug.LogError("Compute");
return A;
}
}
private void Awake()
{
Atom.Reaction(Lifetime, () => Debug.Log(Computed + B));
InvokeRepeating(nameof(IncrementB), 1f, 1f);
}
private void IncrementB()
{
B++;
}
} |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
is this a desired behaviour:
later:
reaction is properly reacting even tho IsNameValid is not marked as [Atom].
If it is desired, then do I understand correcly that:
Beta Was this translation helpful? Give feedback.
All reactions