Город МОСКОВСКИЙ
00:31:32

Godot 4.2 - Singleton Pattern (This is NOT about Autoloads)

Аватар
Plant Library
Просмотры:
24
Дата загрузки:
08.02.2025 22:05
Длительность:
00:31:32
Категория:
Обучение

Описание

Godot 4.2 - Singleton pattern tutorial
In this video you'll get to see my take on the Singleton Pattern on Godot with GDScript without using Autoloads. While Autoloads can be brilliant and very useful they aren't true singletons and a difference must be done between those two concepts.

Discord : https://discord.gg/TBJNZmaAeG (Check channel description for updated link)
Donate : https://paypal.me/SableSpiritStudio

---

Chapters:
00:00 - Intro
01:09 - Defining what a Singleton is
03:24 - Ensure they only have one instance
05:40 - Provide easy access to that instance
09:05 - Singleton pattern in GDScript
14:48 - Instantiate your singletons
16:36 - About queue_free() and the pattern
18:47 - About static
23:38 - Why is everyone using Autoloads for singletons
25:15 - How to invoke singletons
30:07 - Outro

Рекомендуемые видео