Area Unlocking

Hi All!

I am fairly new to the Unity 3D scene and I am currently attempting to limit the areas in which the player is allowed to go. This is so that when the player completes a mini-challenge, a new area of the map is available for them to go to. It is all part of the same terrain. Basically, I want the player to search the available terrain for an object, when they find it, lots of enemies will be spawned and will target the player. The next objective for the player is to reach the safe-zone to complete the level.

I am familiar with Application.LoadLevel(“string”) however, I do not want it to load another scene altogether, I just want it to be like some box colliders have been removed so the player can then walk where they once were.

What is the best technique in your opinion to achieve this?

Any help would be much appreciated.

Kind Regards


well, in terms of performance you might want to either make it a seperate scene, or use occlusion culling. But if you really want it to be in the same scene, you can simply remove the collider through scripting by using Destroy(object.GetComponent(BoxCollider)). Im not sure if that syntax is right with the box collider part, but its something like that.

Thanks very much for the replies guys!

So if I’m right in what you’re saying is to create an empty game object and assign a box collider to it or a piece of terrain perhaps with a gate, and when the object has been picked up, it is possible to access the Box collider and destroy it during game-play? If so that is excellent.

So for performance it is better to create lots of small scenes rather than larger scenes?

Kind Regards