Quantcast
Channel: Recent Discussions — Photon Engine
Viewing all articles
Browse latest Browse all 15755

Script properties don't transfer for instanciated object

$
0
0
I've got an object that I instantiate at runtime that has some script properties. I've noticed that those properties don't make it to the client. Here's some example code:

var item = Resources.Load("SomeItem")
var s = item.GetComponent<MyScript>();
s.someValue = 10;

BoltNetwork.Instantiate(item);
If I check someValue on the server, it's set to 10. If I check it on the client, it's 0. Is there a way to get those assignments to transfer to the client during instantiation?

Viewing all articles
Browse latest Browse all 15755

Trending Articles