DungeonGenerator | A dungeon generator for Unity | Generator Utils library
kandi X-RAY | DungeonGenerator Summary
kandi X-RAY | DungeonGenerator Summary
A dungeon generator for Unity. Based on the TinyKeep dungeon generator. Article can be found here:. Minimum Spanning Tree calculations were done with the following library:
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of DungeonGenerator
DungeonGenerator Key Features
DungeonGenerator Examples and Code Snippets
Community Discussions
Trending Discussions on DungeonGenerator
QUESTION
I'm attempting to generate random dungeons using prefabs.
I have it working to where it will pick a random doorway from a list of doorways and spawn a new room. I then have a script on the bounding box to update the room script for when it intersects another room.
The issue that I am currently having is that I'm not entirely sure on how to wait or delay to check and see if the onTriggerEvent
has been called.
I'm currently checking to see if there was a collision, and setting a boolean
variable to true when that happens otherwise it's false. This always results with the variable being false even though there is collision occurring.
Edit:
This is currently how i'm checking to see if a room is valid:
DungeonGenerator.cs:
...ANSWER
Answered 2021-Sep-20 at 18:25You can use OnTriggerStay()
if I understand correctly, as it returns true if there is something in the trigger and false otherwise. If you are using 2d, use OnTriggerStay2D()
. To use it, just define it as a function like you would normally, with an argument of Collider other
, with Collider being the type, and other being the other collider.. Then, you can check details about the collider(for example you can check if it's the player) and then do stuff to the other collider(and by extension, the entire object) and the object the script is attached to. Here is an example, but it may require tweaking to perfectly fit what you want to do.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install DungeonGenerator
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page