This question was
closed Apr 15, 2017 at 11:51 PM by
LovelyVibes for the following reason:
I was able to figure it out however I no longer remember how I fixed it.
Question by
LovelyVibes · Apr 14, 2017 at 12:12 AM ·
c#voxelcontext
the name 'chunk' does not exist in the current context
I am working on a voxel engine from scratch, and upon saving I have come across this error
Assets/Scripts/Terrain System/World/World.cs(123,42): error CS0103: The name `chunk' does not exist in the current context
public void DestoryChunk (int x, int y, int z)
{
Chunk chunk = null;
if (chunks.TryGetValue (new WorldPos (x, y, z), out chunk))
{
Serialization.SaveChunk (chunk); // enables saving of destroyed chunks
Object.Destroy (chunk.gameObject);
chunks.Remove (new WorldPos (x, y, z));
}
}
Any help will be greatly appreciated.
Comment
Follow this Question
Related Questions
Changing Variable Outside of the Script 0 Answers
Need a variable to exist in the current context - not sure where to start 0 Answers
How do I create voxels like everquest landmark 0 Answers
error CS0103 rb doesn't exist in the current context, ligne 8 and 15 , can't fix it 1 Answer
Cubic Voxel World 0 Answers