using System.Collections.Generic; using UnityEngine; using Mirror; namespace SanAndreasUnity.Net { public class Player : NetworkBehaviour { static List s_allPlayers = new List(); public static Player[] AllPlayers { get { return s_allPlayers.ToArray(); } } [SyncVar] GameObject m_ownedGameObject; public GameObject OwnedGameObject { get { return m_ownedGameObject; } internal set { m_ownedGameObject = value; } } void OnEnable() { s_allPlayers.Add(this); } void OnDisable() { s_allPlayers.Remove(this); } void Start() { } } }