Загрузка...

Unity Fast Play Demo

Fast Play quick demo. Available for free on GitHub: https://github.com/JonathanTremblay/UnityFastPlay
Fast Play adds a ⚡ button to the main toolbar in the Unity Editor (Unity 6000.3+). It allows you to enter Play Mode almost instantly by temporarily disabling Domain and Scene reloading.
--
In a single click (or keyboard shortcut), it has the same effect as:
1. Opening the Edit ➡️ Project Settings ▶️ Editor window,
2. Selecting "Do not reload Domain or Scene" in the "Enter Play Mode Options" section.
3. Clicking the Play button,
4. Restoring your original "Enter Play Mode Options" configuration.
5. Closing the Project Settings window.
--
When Domain Reload is disabled (which Fast Play does), static variables are not reset between play sessions. This is standard Unity behavior for "Fast Play" modes.
You must manually reset your static variables to ensure your game logic works correctly when restarting. The best way to do this is using the [RuntimeInitializeOnLoadMethod] attribute.

👇 CODE EXAMPLE FROM THE VIDEO 👇
// This method runs every time the game loads to reset static variables:
[RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.SubsystemRegistration)]
static void ResetStatics()
{
FishCount = 0;
Debug.Log("Fish static variables reset.");
}

Видео Unity Fast Play Demo канала Jonathan Tremblay
Яндекс.Метрика
Все заметки Новая заметка Страницу в заметки
Страницу в закладки Мои закладки
На информационно-развлекательном портале SALDA.WS применяются cookie-файлы. Нажимая кнопку Принять, вы подтверждаете свое согласие на их использование.
О CookiesНапомнить позжеПринять