PhotonNetwork.Instantiate prefab missing properties

Options
Not sure how best to describe this problem, but will try.

Basically, my Photon Player prefab is getting instantiated with missing properties and components. If I use Unity Object.Instantiate, I get an instance of my prefab that matches, with all properties and child components as expected.

perhaps some kind of weird caching issue?

this works

Instantiate(MyPrefab)

This does not

PhotonNetwork.Instantiate(myPrefab.name)

I'm running the latest version of PUN 2 and Unity 2019.1.4

Comments

  • nevermind. As per the documentation, if you have 2 prefabs with the same name in the resources folder (any resources folder), Photon will use the first one it finds, not the one you have referenced.

    I had another resources folder elsewhere in the project that also had a PhotonPlayer prefab. I was referencing the correct object in my settings, but that did not matter.