// Start is called before the first frame update void Start() { InGameEventManager.Instance.Register(this); //renderer.material.SetColor("_BaseColor", Color.green); working = true; isContinuouslyInteractlable = false; iconHandler = gameObject.AddComponent <HUDIconHandler>(); iconHandler.dependsOnDistance = false; // You can look up the property by ID instead of the string to be more efficient. }
protected virtual void Start() { iconHandler = GetComponent <HUDIconHandler>(); iconHandler.UpdateText(partName); }