public void SetHover(Renderer obj) { outlineColor = defaultOutlineColor; if (currentObj != null) { currentObj.gameObject.layer = LayerMask.NameToLayer("Interactable"); } currentObj = obj; try { CustomGlowColor gc = currentObj.GetComponent <CustomGlowColor>(); outlineColor = gc.glowColor; } catch (System.Exception e) { DisposableVariables.Exceptions(e); } if (currentObj != null) { currentObj.gameObject.layer = LayerMask.NameToLayer("InteractableHover"); } }
void Start() { zone = transform.parent.parent.GetComponentInChildren <FoxZone>(); glow = GetComponent <CustomGlowColor>(); }