suriyun-production / mmorpg-kit-docs

This is document for MMORPG KIT project (https://www.assetstore.unity3d.com/#!/content/110188?aid=1100lGeN)
https://suriyun-production.github.io/mmorpg-kit-docs
49 stars 11 forks source link

player spawn #2381

Closed juniormagalhaes closed 6 months ago

juniormagalhaes commented 6 months ago

Where is the player spawn setting? I want to try to delay the player's spawn a little, due to an optimization asset in World Streamer 2, which delays the instantiation of the terrain a little, and the player always ends up falling

insthync commented 6 months ago

Don't have it.

insthync commented 6 months ago

You may try delaying it before spawning an entities at first time when scene is loaded by create a class based on BaseGameNetworkManagerComponent like this

public class WaitSceneLoadComp : BaseGameNetworkManagerComponent {
  public override bool UpdateReadyToInstantiateObjectsStates(BaseGameNetworkManager networkManager, Dictionary<string, bool> readyToInstantiateObjectsStates) {
    readyToInstantiateObjectsStates["ANY_WAITING_KEY"] = true; // Set new key with TRUE/FALSE value (TRUE when data loaded)
  }
}
juniormagalhaes commented 6 months ago

thanks