Quantcast
Channel: Photon Unity Networking (PUN) — Photon Engine
Viewing all articles
Browse latest Browse all 8947

customized clothes for players

$
0
0
hey guys,

I have a rather unique situation that i havent seen to many other developers talk bout yet with photon. my players have the ability to make there own customizable character for my game. so far everything runs great, they move nice and smoothly, they spawn in their correct places. but they all share the same look as what ever settings that player currently has set for himself.

for example, to player 1, player 2 and 3 look just like player 1. to player 2, player 1 and 3 looks like 2 and so on..

the way my main player prefab is set up is i have one gameobject with the players controls as well as the photonview script. then i have child objects representing the interchangable body parts (facial hair, skin, shoes, hair, etc) each child object has a script that controls the settings for the mesh and texture of that skinnedMeshRenderer. all of those child objects scripts are controlled by the strings stored on a GameInformation script (ex: GameInformation.HairColor = BROWN) kept on a gameobject that floats around between scenes and never gets destroyed..

i have an idea about RPCs and opevents but i have no clue where to put them.. is there a simple way to use my GameInformation script to set up RPC calls made when that players first spawned? if so do i need to set up a photonview or networkview on that gameobject? or should i have photonveiwers set up on each of the child gameobjects of the main player prefab observing those individual skinnedmeshrenderers?

thanks in advance guys,
CJ

Viewing all articles
Browse latest Browse all 8947

Trending Articles