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

Does PhotonNetwork.Instantiate call the new GameObject's Start method ?

$
0
0
Hello,

First, I am following the PUN tutorial on the Photon web site.

In my game, I have a GameManager, a PlayerManager and a PlayerUI (and others but these three cause me some problems). In my GameManager Start method, I instantiate the local player which has a PlayerManager component. Because I use PhotonNetwork.Instantiate, this is sync on each client game, right ?

In the PlayerManager Start method, I call Unity's Instantiate method for creating a new PlayerUI. For the local player all is ok, but when a new player joins the room, a new PlayerManager appears in the hierarchy, but the Start method was not called, so there is no PlayerUI object created for him.

Why ?
Thanks

Viewing all articles
Browse latest Browse all 8947

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>