public void RegisterScene(WorldAtlasSceneAnchor anch) { if (Networking.isServer) { // Assign this world to the currently loading chunk // } }
public void MakeChunkForDefaultScene(WorldAtlasSceneAnchor anch) { Debug.Log("MakeChunkForDefaultScene!!!"); WorldChunk chunk = new WorldChunk() { x = 0, y = 0, width = 1, height = 1, chunkSceneId = 0, anchor = anch }; allChunks[0][0] = chunk; chunkRefs[0] = new List <WorldChunk>() { chunk }; }
public void RegisterScene(WorldAtlasSceneAnchor anchor) { Debug.Log("RegisterScene!"); if (waitingChunk == null) { Debug.Log("Make Default!"); // Debug.LogError("Attempt to register a scene with no waiting chunk"); MakeChunkForDefaultScene(anchor); } else { Debug.Log("Callback!"); int x = waitingChunk.x, y = waitingChunk.y; float offsetX = x * gridWidth, offsetY = y * gridHeight; Debug.Log("The chunk coords are " + x + " : " + y); anchor.gameObject.transform.position = new Vector3(offsetX, 0, offsetY); waitingChunk.anchor = anchor; waitingChunk.callback(waitingChunk); waitingChunk = null; } }