isFreshModel always true
As the title says, what could cause isFreshModel to always be true? I have a very simple model, with only an int value to keep a seed for random generation purposes synchronized, but it seems to always return true for all clients. Thanks in advance
9 Replies
Hi @Octoyisus. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:
----------------------
The
isFreshModel
property in the RealtimeModel
class of NormalVR is set to true
if the model was just locally created. This flag can be used to apply component settings or initial values to a newly instantiated model. If isFreshModel
is always returning true
, it could mean that your model is being instantiated every time it's checked, rather than persisting.
However, without more information about your specific implementation, it's hard to say exactly why this is happening. You might want to check if your model is being destroyed and recreated frequently, or if there's an issue with how your model's lifecycle is being managed.
Also, ensure that your project has no compilation errors. If your project has any errors, any changes you make to the model will not be visible to the model editor. This could potentially affect the isFreshModel
property.
Here is the reference to the isFreshModel
property in the documentation: RealtimeModel Properties (https://normcore.io/documentation/reference/classes/Normal.Realtime.RealtimeModel)
----------------------
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
----------------------<@286884711874166784> kapa.ai is still learning and improving, please let us know how it did by reacting below
scene view or spawn from prefab?
Scene view
you sure you aren't destroying it by accident ?
100%
But
Now it seems to be working
With no change in my part
maybe it just needed a recompile
Maybe there was some issue with te model compilation?
Yeah
Thank you as always