Тёмный

Use OnEnable to Setup Events and Statics. 

DVS Devs (Dan Violet Sagmiller)
Подписаться 1,4 тыс.
Просмотров 363
50% 1

Start and Awake don't get called on recompile and continue and Runtime InitializeOnLoadMethod does not get called with No Domain Reloading.
These two combined can dramatically improve your development time, as it goes from seconds to load and get back to testing to get back to coding to Instant. Code while you run the game, support event driven behaviours.
Please join Patreon / danvioletsagmiller
Discord Link: / discord
#unity #unity3d #tutorial #videogamedev #gamedev #architecture

Опубликовано:

 

2 окт 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 4   
@vietdungdev
@vietdungdev Год назад
wow, thanks for this trick, my unity run so fast now.
@tobario
@tobario Год назад
Awesome Video, thank you. I just use Scriptable Object Events or Inspector Wired Unity Events for almost everything. It works like a charm.
@libberator5891
@libberator5891 Год назад
I was about to write a long comment that's basically like "it works fine for me", but I had missed your point at 4:00 where you specify about having "Recompile and Continue Playing". You should put more emphasis on that point (felt glossed over or I just have poor attention). That's not a mode I usually use; I prefer "Recompile After Finished Playing". Properly unsubbing in OnDisable seems to also be called when it's playmode-recompiled, so that's good news. Side note: I like to use that [RunTimeInitializeOnLoadMethod] attribute for where the static things (events, collections, etc.) reside to reset them instead of each subscriber trying to do that. But, as you said, doesn't apply if you have the recompiling set to "Continue Playing"
@dvsdev
@dvsdev Год назад
I completely agree. I'm thinking I need to redo this video. When I put it together, the specific challenge I was addressing, was why do some events go away after a recompile and continue play or get damaged between plays with No Domain Reloading turned off. Specifically with both of them enabled at the same time, since they influence each other. Unfortunately, there is no great title to condense that. This feels more like a fragment of a college course. I'm considering creating a replacement video. But I don't have a better representation in mind yet. I'm all for ideas to simplify or redirect. I'm actually putting mind towards creating a series that show interconnecting patterns and principles within Unity. I.e. Once you have chosen feature X, you lose Feature Y and this other pattern changes because you lose Z.
Далее
Architecture Talk at GDG
53:10
Просмотров 851
Провал со стеклянным хлебом…
00:41
Visualizing the Speed of Light
15:28
Просмотров 161
.NET and C# are in trouble. Here is what I'd do.
10:57
Negative Time is Real, Physicists Confirm. Kind Of.
6:59
101 Weird But Useful Minecraft Hacks
48:36
Просмотров 4,5 млн
Low Level Memory in C#/Unity?
42:48
Просмотров 1,9 тыс.
Провал со стеклянным хлебом…
00:41