So I was working on my other world and I found this thing called “FieldChangeCallback” Otherwise it did seem to work like how I wanted.
However when I have multiple callbacks, I cant seem to be able to decide the execution order for these callbacks. Like what if I had a callback that is dependent on another callback?
In cases like these I need to control which callback comes first. Cause right now late joiners will get the sprite as null, because they havent gotten the sprite from ItemName callback first, like the rest of the players.
thats what I tried first, but it didnt help. Cause even so the card sprite was blank for late joiners. Which is why I tried this solution, so if I can somehow control which variables get synced first in late join, then late joiners can get the sprite accordingly
ok I found a solution that works for me, even tho it wasnt part of my original plan. So now I just have the Update give my image the sprite if bool is on. And inside the bool setup I define where the img component is and if it should be enabled or disabled.
But still it could be a big change if people could define the execution order of the udonsynced variables for late joiners.
so basically it can be toggled if the image is enabled or not.
and the card itself can be spawned from vrc object pool, meaning that by default is not active.
and I have tried that method at some point even with OnEnable. However it didnt work as I wanted, so Im going with this plan which has no issues at all.