using Unity.Netcode; namespace Reset.Units{ public class UnitComponent : NetworkBehaviour{ private bool enabledAsHost = true; private Unit _unit; internal Unit Unit{ get { if (_unit != null) { return _unit; } _unit = GetComponent(); return _unit; } } void DisableComponent(){ enabledAsHost = false; } } }