Describe the bug
When using Instantiate to create a non networked object, inside the Start/Update/OnTriggerEnter etc. both isServer and isClient are always false in the spawned object, regardless of whether the method is running on the server or the client. [ServerCallback] and [ClientCallback] work but even then isServer and isClient return false inside those methods.
As I'm new to mirror I assumed I was doing something wrong, but they return correctly when using non spawned objects (placed in scene prior to running). So I have to assume it's a bug unless I misunderstand some behaviour about spawned objects. I tried older versions of mirror and had same issue.
It's just a player object and spawned objects, arrow keys to move and press spacebar to spawn the object on the client and server using a [Command]. The Console will log isServer/isClient on Start/Update/OnTriggerEnter on the spawned objects.
Expected behavior
isServer/isClient should return true when functions are running on the server or client respectively.
Desktop (please complete the following information):
Describe the bug When using Instantiate to create a non networked object, inside the Start/Update/OnTriggerEnter etc. both isServer and isClient are always false in the spawned object, regardless of whether the method is running on the server or the client. [ServerCallback] and [ClientCallback] work but even then isServer and isClient return false inside those methods.
As I'm new to mirror I assumed I was doing something wrong, but they return correctly when using non spawned objects (placed in scene prior to running). So I have to assume it's a bug unless I misunderstand some behaviour about spawned objects. I tried older versions of mirror and had same issue.
[IMPORTANT] How can we reproduce the issue, step by step: I made a template: https://github.com/Quetra1/isServerDemo
It's just a player object and spawned objects, arrow keys to move and press spacebar to spawn the object on the client and server using a [Command]. The Console will log isServer/isClient on Start/Update/OnTriggerEnter on the spawned objects.
Expected behavior isServer/isClient should return true when functions are running on the server or client respectively.
Desktop (please complete the following information):