1 Line Fix for your Unity Project
https://game.courses/mp/ - Multiplayer Mastery Course
* for anyone who wants the code, here it is
using Unity.Services.Core;
using UnityEngine;
using UnityEngine.SceneManagement;
public class Bootstrapper : MonoBehaviour
{
async void Start()
{
Application.runInBackground = true;
await UnityServices.InitializeAsync();
if (SceneManager.loadedSceneCount == 1)
SceneManager.LoadScene("CarSelection", LoadSceneMode.Additive);
}
[RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.BeforeSceneLoad)]
static void Init()
{
#if UNITY_EDITOR
var currentlyLoadedEditorScene = SceneManager.GetActiveScene();
#endif
if (SceneManager.GetSceneByName("Bootstrapper").isLoaded != true)
SceneManager.LoadScene("Bootstrapper");
#if UNITY_EDITOR
if (currentlyLoadedEditorScene.IsValid())
SceneManager.LoadSceneAsync(currentlyLoadedEditorScene.name, LoadSceneMode.Additive);
#else
SceneManager.LoadSceneAsync("CarSelection", LoadSceneMode.Additive);
#endif
}
}
Видео 1 Line Fix for your Unity Project канала Jason Weimann
* for anyone who wants the code, here it is
using Unity.Services.Core;
using UnityEngine;
using UnityEngine.SceneManagement;
public class Bootstrapper : MonoBehaviour
{
async void Start()
{
Application.runInBackground = true;
await UnityServices.InitializeAsync();
if (SceneManager.loadedSceneCount == 1)
SceneManager.LoadScene("CarSelection", LoadSceneMode.Additive);
}
[RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.BeforeSceneLoad)]
static void Init()
{
#if UNITY_EDITOR
var currentlyLoadedEditorScene = SceneManager.GetActiveScene();
#endif
if (SceneManager.GetSceneByName("Bootstrapper").isLoaded != true)
SceneManager.LoadScene("Bootstrapper");
#if UNITY_EDITOR
if (currentlyLoadedEditorScene.IsValid())
SceneManager.LoadSceneAsync(currentlyLoadedEditorScene.name, LoadSceneMode.Additive);
#else
SceneManager.LoadSceneAsync("CarSelection", LoadSceneMode.Additive);
#endif
}
}
Видео 1 Line Fix for your Unity Project канала Jason Weimann
Показать
Комментарии отсутствуют
Информация о видео
Другие видео канала
Multiplayer Outline & Request - Unity MP Devs Reply in commentsGameDevShow #145 - GIT vs Unity Source ControlCool Text TRICK - #unity3dThe GameDevShow | Building RPGs & Other GamesCoding a Role Playing Game LIVE #unity3d + Q&ADevs with 2 Computers, WATCH THIS!VARIANTS ONLY - Unity Prefab Changes You need to know about!The GameDevShow | Highland PANIC | Data | AI | More!LIVE - Vision Pro or NO? - GameDevShow #unity3d #virtualreality #augmentedrealityLIVE - Vision Pro or NO? - GameDevShow #unity3d #virtualreality #augmentedrealityUnity Interfaces - Complete Guide (Plugins, Abstraction, Events, & More) #unity3dWhat Nvidia & Meta Announcements mean for #GameDevs + LTS2022 & DOTS - GameDevShowChatting about Interfaces & Fixing Giveaway Battler CodeUNITY 2022 LTS - Secret Gems Inside! #unity3dAI, Performance, Zelda, is MF Wrong? + Game Jams - GameDevShowInterview with John Riccitiello | AI | Future of UnityThe BEST Spring Sale Tools & Assets for Unity Devs | The Game Dev Show10 Years of Unity GameDev Tools! (The secret 1/1000 I use constantly)Best of GDG | Googles AI Update | The Game Dev ShowWhich Unity Plan is RIGHT for YOU? | 3 you know and 2 secret ones..