Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

2DPhysics Layers and Network Instantiation

Discussion in 'Multiplayer' started by darthbator, Jan 19, 2017.

  1. darthbator


    Jan 21, 2012
    So I am having a REALLY strange issue that has started showing up sometime in the Unity 5.5 release cycle (and continues into 5.6 beta). Where when I instantiate a new object it won't interact with any network object in the scene that where not instantiated at runtime.

    This has ended in a REALLY strange practice where I instantiate objects onto the "default" layer and then change their layer at runtime in code in order to make things work. Is anyone else running into this? What's going on?

    As an example I have a bunch of enemies in a scene, when I instantiate a player object (a local authority object spawned by the players player authority object) on the player layer he can't interact with any of them. However if I change the prefab to another layer and then alter the layer at runtime it all works as expected.