The Photon Forum
is Closed Permanently.

After many dedicated years of service, we have made the decision to retire our Forum and switch to read-only: we´ve saved the best to last! Your search result can be found below. Plus, we offer support via these channels:

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).

Write Us
an E-Mail

Feel free to send your question directly to our developers.

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

WARdd
2022-07-19 11:12:25

[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