- Home /
Get Photon View Id of gameobject.
Hello guys, i am converting my Unity multiplayer game into Photon Multiplayer and i am stuck in one place where i have to get the PhotonViewID of a game object. In unity networking you can get the view id like this.
character.networkView.viewID
but i do not know how to get the photon View id?
any help will be appreciative thanks
Answer by greenland · Nov 22, 2012 at 07:31 AM
Perhaps you've forgotten to prefix `MonoBehavior` with `Photon.MonoBehavior`. That inheritance should add the `PhotonView`; property.
Answer by SamTheT · Apr 20, 2015 at 09:36 PM
So, if you are still following this topic, I found an answer:
so, before any "voids" write : PhotonView thisPhotonView
then in Start() write : thisPhotonView = GetComponent()
then you can just write : thisPhotonView.viewID
Your answer
Follow this Question
Related Questions
Photon Cloud max players 1 Answer
Client Disconnect with message “Peer Created” - PUN 0 Answers
Multiplayer cant see host player C# 0 Answers
PUN how to make a networked timer 1 Answer
A node in a childnode? 1 Answer