After doing PUN setup for a NPC character, default weapons stop equipping at start

clarson

New member
I created a new agent character with a sword. When starting the scene, all was well and the sword was equipped by default. I then did the PUN setup (through the add-on Manager->Object Setup). Now when I start the scene, it is not equipped by default. If I kill the agent and let it respawn though, then the default item (sword) is equipped.

Any ideas?
 

clarson

New member
If I remove the PunNetworkInfo script from the agent, the sword equips fine. Looking at the script, I'm wondering if it is because I'm currently running in offline mode?
 

clarson

New member
Issue seems to be because I'm not loading the scene from a "menu", and I am simply connecting within a level. Since there is not a connection until after much of the scene has loaded, it causes this issue. I may need to make the connection script a higher priority or something.
 

Justin

Administrator
Staff member
PUN does require you to load the gameplay scene from another scene in order for it to properly setup the connection.
 
Top