Playmaker Forum
PlayMaker Help & Tips => PlayMaker Help => Topic started by: 600 on August 06, 2014, 02:43:45 PM
-
Hello,
Posting this regarding a Skype group conversation.
Setup:
In Scene there are a "Sync Manager" for animations for Players.
- A Player sends his variables with RPC to Manager,
- it recieves animation string,
- converts to float,
- gets Player Name string,
- and Finds Gameobject by Tag a player to set that info.
Thinking to avoid this extra finding thing looked into Player Custom Property,
there are dropdown menu with gameObject variable.
For now I get an error, but fsm still running and stuck at that state.
please check picture bellow.
Floats and Ints works allright.
Could I send this data somehow so a reciever gets that Players gameobject match?
All Players have Photon View and gameObjects are renamed to Users custom name when joined.
Thanks
-
Hi,
You can not pass GameObject references across the network. you need to pass its name. If the name is not unique, then you'll need to implement a system to reference in each scenes a particular object using a string, or an int, or something.
I have added this case in the trello task to warn users of this case where gameobject ( textures and materials, as well) can't be sent across the network.
Bye,
Jean
ps: having said that, I should implement a case where if the user wants to send a gameobject, it can only send one that has a network view and then I only pass the viewID, and find it automaticall when the other side received this reference. I have implemented something like that with uLink, I'll spread this back to photon.
https://trello.com/c/7uuBZfv8/7-photon
-
Thanks for the reply,
its a great idea about viewID to send id with auto-find its "other side",
that would be sooo convenient :)
Now I have a system something you suggested, but its all manually looped while finding etc. Most important that it works,but could be optimized in future with this autoID-feature :)
Checking trello, thanks!