m_Script: {fileID: 11500000, guid: 3a698c89160b64541b11228f3098737b, type: 3}
m_Name:
m_EditorClassIdentifier:
m_MovementSpeed: 10
m_MovementSpeed: 2.5
m_AnimatorController: {fileID: 214216475}
--- !u!1001 &1171686176522753923
PrefabInstance:
propertyPath: m_Name
value: Player
objectReference: {fileID: 0}
- target: {fileID: 8083381679980500539, guid: 67db914bd437a69468c6d966454659b0,
type: 3}
propertyPath: m_MovementSpeed
value: 2.5
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 67db914bd437a69468c6d966454659b0, type: 3}
--- !u!1001 &2096555481
using UnityEngine;
using UnityEngine.SceneManagement;
using UnityEngine.AddressableAssets;
public class GameManager : MonoBehaviour
public static void LoadNextLevel()
{
//TODO: Show old workflow
// We are going to be using the Addressables API to manage our scene loading and unloading, the equivalent way on the UnityEngine.SceneManagement API is:
// SceneManager.LoadSceneAsync("LoadingScene", LoadSceneMode.Single);
// Scene loaded in Single mode, the previously loaded scenes will be disposed by the Addressables.
/// <summary>
public static void LevelCompleted()
s_CurrentLevel++;
public class Loading : MonoBehaviour
private bool m_LoadingComplete = false;
//private bool m_LoadingComplete = false;
[SerializeField]
private Slider m_LoadingSlider;
// TODO: Maybe just have it inside the Start method and not class-wide
AsyncOperationHandle m_SceneHandle;
private AsyncOperationHandle m_SceneHandle;
// Start is called before the first frame update
void OnEnable()
m_LoadingSlider.value = m_SceneHandle.PercentComplete;
}
//Make the oncomplete
private Transform m_HatAnchor;
void Start()
//TODO: Remove this random stuff, just for testing atm
// TODO: Change the string parameter
public void SetHat(string hatKey)
// We are using the InstantiateAsync function on the Addressables API, the non-Addressables way
// looks something like the following line, however, this version is not Asynchronous
// GameObject.Instantiate(prefabToInstantiate);
// TOASK: Where to unsubscribe
private void OnDisable()
// TODO: Unsubscribe