1 Line Fix for your Unity Project

  Рет қаралды 14,582

Jason Weimann

Jason Weimann

Күн бұрын

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
}
}

Пікірлер: 48
Top Game Development Tools for Solo Devs | Must-Haves for Unity
10:02
У ГОРДЕЯ ПОЖАР в ОФИСЕ!
01:01
Дима Гордей
Рет қаралды 7 МЛН
10 Steps I use to Design and Code Big Game Systems in Unity3D
30:14
Jason Weimann
Рет қаралды 70 М.
Unity Tutorial: Creating a bootstrap scene
22:55
Iain McManus
Рет қаралды 4,2 М.
Unity Функции Update и FixedUpdate
3:09
CraftPix - Game Assets
Рет қаралды 15 М.
Create a server for your Unity game using .NET Core
24:51
Tarodev
Рет қаралды 71 М.
Should you use Assets? Is it cheating? Asset flip?
7:26
Code Monkey
Рет қаралды 54 М.
20 Advanced Coding Tips For Big Unity Projects
22:23
Tesseract
Рет қаралды 181 М.
Delegates, Events, Actions and Funcs - The Observer Pattern (Unity & C#)
11:48
The INSTANT Unity Character Controller for first and 3rd Person Games
13:53
Giving Personality to Procedural Animations using Math
15:30
t3ssel8r
Рет қаралды 2,5 МЛН