Files
Ipseity-Demo/Assets/Unheimlich_POC/Scripts/Gameplay/GameObjects/Player/Player.cs
T

23 lines
503 B
C#

using UnityEngine;
namespace Unheimlich.Gameplay.Player
{
/// <summary>
/// Singleton player reference accessible globally throughout the game.
/// </summary>
public class Player : MonoBehaviour
{
public static Player Instance { get; private set; }
private void Awake()
{
if (Instance != null && Instance != this)
{
Destroy(this);
return;
}
Instance = this;
}
}
}