void Start()
{
//on client, this isn't required but is nice for testing.
Application.runInBackground = true;
var globals = FindObjectOfType<GlobalAssets>();
_networkStateEntityProtoType = globals.NetworkEntityStatePrototype.GetComponent<NetworkIdentity>();
ClientScene.RegisterSpawnHandler(_networkStateEntityProtoType.assetId, OnSpawnEntity, OnDespawnEntity);
_client = new NetworkClient();
_client.Connect("localhost", 7777);
_client.RegisterHandler(MsgType.Connect, OnClientConnected);
}