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

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.

Custom Instantiation Data : Send GameObject or Components ?

Jimanji
2020-03-28 20:13:36

Hello,
its not possible to send GameObject or Components with this technique ? :

Thank you

Comments

Tobias
2020-03-30 10:39:21

Right. GameObject and Components are not serializable.
What you can do is create a script for the prefab to enable/disable components or subobjects on demand. Then send a bool[] which ones need to be active.

Jimanji
2020-03-30 12:41:27

Ok thank you, that help me.

DbzRock
2020-11-29 03:29:19

@Tobias how can a make my own object[] myCustomInitData?
I have to pass some int values to the OnPhotonInstantiate but I can't figure out how to do it.

Jimanji
2020-11-29 11:29:43

@DbzRock

Back to top