// PlayerChangingChunk Event method. void PlayerChangingChunk(object source, MyEventArgs e) { Vector3 testPosition = UnityTools.Ceiling(transform.position, chunkLength / 2); lastChunk = currentChunk; currentChunk = UnityTools.ClosestWithTag(this.gameObject, "Chunk"); currentChunk.layer = 9; lastChunk.layer = 8; }