You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
683 B
C#
22 lines
683 B
C#
using Unity.Netcode;
|
|
using UnityEngine;
|
|
|
|
namespace Unity.Multiplayer.Samples.Utilities
|
|
{
|
|
/// <summary>
|
|
/// Simple object that keeps track of the scene loading progress of a specific instance.
|
|
/// </summary>
|
|
public class NetworkedLoadingProgressTracker : NetworkBehaviour
|
|
{
|
|
/// <summary>
|
|
/// The current loading progress associated with the owner of this NetworkBehavior
|
|
/// </summary>
|
|
public NetworkVariable<float> Progress { get; } = new NetworkVariable<float>(0, NetworkVariableReadPermission.Everyone, NetworkVariableWritePermission.Owner);
|
|
|
|
void Awake()
|
|
{
|
|
DontDestroyOnLoad(this);
|
|
}
|
|
}
|
|
}
|