1 Scene INFINITE Levels by Spawning Levels from ScriptableObject Data at Runtime | Unity Tutorial

preview_player
Показать описание
Learn how I used ScriptableObjects to spawn tiles and prefabs into my single game scene to support INFINITE numbers of levels! Using a simple editor tool and the Tilemap, I crafted the levels in the editor, saved them to a ScriptableObject to ensure visual consistency across the levels and keeping a small game footprint.

📚 Resources:
⚫ How to combine meshes at runtime: (coming soon 😉)

🧡 Believe in LlamAcademy's mission and have received value from the videos? Here's how you can show your support:
📚 Take my Unity ShaderGraph Course:

Some links may be affiliate links, which at no additional cost to you, gives me a small portion of the purchase.

Chapters:
00:00 Topic Introduction
01:17 How Scene Data is Saved
01:40 Demo / How it works
02:45 Main Menu / Passing Data Between Main Menu & Game Scene
03:29 How to Spawn the Objects
06:09 Procedural Animate In
07:45 Start the Game & Reset Ball on Out of Bounds
10:25 Recap, Closing Thoughts, & Support LlamAcademy
Рекомендации по теме
Комментарии
Автор

I did the same for my solitaire levels and used LevelSO too, naming right 🤣.
Super interesting usage, thanks for sharing !

captainnoyaux
Автор

you just have to be carefully not have references to the scene. let say there are 1000 levels and every level have its own prefab and u drag them to a field on the So. and if the so is referenced in the scene, then all the prefabs will be loaded into the ram and this can cause some issues. I dont have any refence to the SOs and load them by name (index)

mehmedcavas
Автор

Great stuff :)
It just came to mind, did you show how you solved the strange collision "glitches" where the ball collides with perfectly aligned cube colliders?

geri
Автор

So all the Levels in the Holes Menu had their respective SO manually dragged into the main Level Data SO? They're not dynamically populated?

MXMLLN
Автор

Did you invent this technique? I have been implementing it for my next generation Brick Breaker mobile game and haven't been able to find a single other example like this.
What can I search for to find other examples? I would have assumed that many 2d puzzle games would use this paradigm, especially Match 3.

MXMLLN