Really bizarre issue here. I have some AISpawner instances that handle server-side instantiation of enemies. The code is incredibly simple, and works without a hitch across Windows, Mac, iOS and Android:
var ai = Network.Instantiate(AIPrefab, Vector3.zero, Quaternion.identity, 0) as GameObject;
var controller = ai.GetComponent<AIController>();
controller.Init(GetSpawnPosition());
AIPrefab is an inspector variable, and GetSpawnPosition just grabs a random position from within the spawn area; Init just does some post-spawn setup. This is only ever called on the server.
For some weird reason, this causes a good second’s worth of lag, but only when I’m playtesting in the editor; works smoothly as expected even on mobile. I’m using Unity Free and the basic mobile licences, so I can’t profile.
Any thoughts?