private Shadow GetShadowComponent(Transform transform) { Outline outline = transform.GetComponent <Outline>(); if (outline == null) { return(transform.GetComponent <Shadow>()); } return(transform.GetComponents <Shadow>().FirstOrDefault(t => t.GetInstanceID() != outline.GetInstanceID())); }