Error
The whole answer can be found below.
Try Our
Documentation
Please check if you can find an answer in our extensive documentation on Fusion.
Join Us
on Discord
Meet and talk to our staff and the entire Photon-Community via Discord.
Read More on
Stack Overflow
Find more information on Stack Overflow (for Circle members only).
Error: Networked properties can only be accessed when Spawned() has been called.
minaammunir
2022-07-16 03:47:26
When I try to access a [Networked] property, I get following error. I have Spawned function as override in my script class. How to solve this issue?
Error:
Networked properties can only be accessed when Spawned() has been called.
Comments
[Networked] properties are not available until Fusion finished handling spawning of an object. Whether or not you override the spawned function doesn't matter for this. You can do a check with "Object != null" although this a bit cheeky. Generally you should only start accessing networked properties in FixedUpdate, which is never called before Spawned. I suspect you misunderstand how networked properties are supposed to be used and are doing something wrong, but I will need more info to say exactly what's going on.
Back to top