DungeonBuilder | A really simple dungeon generator in javascript | Frontend Framework library
kandi X-RAY | DungeonBuilder Summary
kandi X-RAY | DungeonBuilder Summary
A really simple dungeon generator in javascript.
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 DungeonBuilder
DungeonBuilder Key Features
DungeonBuilder Examples and Code Snippets
Community Discussions
Trending Discussions on DungeonBuilder
QUESTION
I have just started using Unity and I am trying to put together a simple C# script that places the Prefabs (some 2D sprites) on pre-defined positions. The problem is, that whenever I apply the script to the prefabs and try to play the scene, Unity freezes and apparently generates an infinite loop that uses up all the memory (sometimes even giving me a black screen) and I have to force-kill the process in the task manager.
The code, however, is very simple and contains no loops at all:
...ANSWER
Answered 2017-Jun-01 at 06:09Your DungeonTest script should not be on the prefab you are instantiating. What's happening is that Start() gets executed every time the prefab gets instantiated.
So the first tile creates 3 new tiles. Each of those tiles now also make 3 new tiles and so forth to infinity.
Make a new object in the scene with the DungeonTile script and remove all scripts from the prefab you are instantiating.
This does not mean you can't have scripts on your prefab. Simply keep in mind that whatever is in your Start() method will execute as soon as your new instance is added to the scene.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install DungeonBuilder
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