OnDisable
AdvancedDetailed
When this object becomes inactive.
Happens when this object becomes inactive. It also happens when the object is destroyed, so it suits cleanup.
Set Active turning the object off causes it, only on the screens where that action ran. To keep everyone in step, switch it with a synced variable (The same state for everyone).
Keep the card's advanced setting at Only my screen; anything else runs the actions once per player each time.
Official docs: MonoBehaviour.OnDisable (Unity)
On a card
WhenOnDisable⋯
What to do
+ Add what to do
In Udon
In UdonSharp, this is the method:
void OnDisable()