0
Answered

Why must my maps contain an ExitTrigger object?

Anonymous 5 years ago • updated by Daedalus 5 years ago 2
I have found when using the RunTimeGeneratorBehavior that an object appears in the DynamicMap folder called ExitTrigger. It has a 5x5x5 box collider and calls RuntimeGeneratorBehavior, causing the maze to regenerate around the player when entered. This happens even if "Generate Entrance and Exit" is unchecked. I cannot find this object in my project folder, so it would appear that it is being created at runtime. I would very much like it if my maps did not regenerate while the player is still in them, and would enjoy the ability to specify my own events to occur when the player reaches the exit, if any.
Under review
You don't have to use an ExitTrigger object; that's just an example of use for runtime generation. You can write your own logic that handles how and when to generate a new map. Have a look at the RuntimeGeneratorBehaviour.cs script to see how it's done.