#I am using IsValid isDone
1 messages · Page 1 of 1 (latest)
Yes, it is not valid if it is not loaded, so I guess you shouldn't use reverse statement for isDone at least
IsValid() && isDone
!IsValid() || !isDone
IsValid() && !isDone is to check if it is currently being instanced
doesn't it work?
no, this statement will almost always be false
!IsValid() || !isDone wouldn't this be either not started loading, or currently loading?
hmm
are you trying to start instancing process once and then multiple times get the result?
when a handle ends loading, does it make it not valid?
It's just that I instance based on distance to an anchor, and it checks every 0.1s. If it tries to instance twice before it's done, then I get double instance.
I use InstantiateAsync
I may be wrong with instancing but I rely only on valid statement to load and unload scenes for example. So while my scene is loaded my reference will be valid
hmm
with the same assetreference?
yes
I guess I can check if the asset is valid, since it's synchronously instanced once the asset is loaded (InstanceAsync does the LoadAssetAsync behind the scenes)
thanks for helping
We are loading the same sprite with the same reference from different places like this