static CompositeShadowCaster2D FindTopMostCompositeShadowCaster(ShadowCaster2D shadowCaster)
        {
            CompositeShadowCaster2D retGroup = null;

            Transform transformToCheck = shadowCaster.transform.parent;

            while (transformToCheck != null)
            {
                CompositeShadowCaster2D currentGroup;
                if (transformToCheck.TryGetComponent <CompositeShadowCaster2D>(out currentGroup))
                {
                    retGroup = currentGroup;
                }

                transformToCheck = transformToCheck.parent;
            }

            return(retGroup);
        }
        static CompositeShadowCaster2D FindTopMostCompositeShadowCaster(ShadowCaster2D shadowCaster)
        {
            CompositeShadowCaster2D retGroup = null;

            Transform transformToCheck = shadowCaster.transform.parent;

            while (transformToCheck != null)
            {
                CompositeShadowCaster2D.CompositeShadowCaster2DsByTransform.TryGetValue(transformToCheck,
                                                                                        out CompositeShadowCaster2D currentGroup);
                if (currentGroup != null)
                {
                    retGroup = currentGroup;
                }

                transformToCheck = transformToCheck.parent;
            }

            return(retGroup);
        }