change player prefab at runtime?

Is there any component or script included to update the player to use a new prefab at runtime so I can change which model is being used by the player?

thanks!

Comments

  • Should say I am running the Demo Voice multiplayer scene..
  • JohnTube
    JohnTube ✭✭✭✭✭
    Hi @alex_evp,

    I cannot understand your question.
    In Photon Voice you can instantiate Voice Prefabs at runtime.
  • sorry, I am using the demo voice file as a starting point..

    the scene starts and it assigns each player a prefab as they join.

    I am interested in being able to change the players character prefab while the game is running.

    thanks..
  • JohnTube
    JohnTube ✭✭✭✭✭
    I see, you mean you want to replace/swap prefab of characters on runtime and eventually after joining Photon rooms.
    I guess it's possible, try destroying and instantiating new voice prefab and see if it works and voice keeps working.
  • yes thats it :smile: which component / script should I look for or should I make my own and add it to the PUN object?
  • JohnTube
    JohnTube ✭✭✭✭✭
    @alex_evp

    You need PhotonVoiceRecorder and PhotonView as mentioned in the documentation. Those are the required components for "Audio Source Prefab".