Beispiel #1
0
        void FindParentSettings()
        {
            if (mySettings == null)
            {
                mySettings = GetComponentInParent <CurvedUISettings>();

                if (mySettings == null)
                {
                    return;
                }

                myCanvas = mySettings.GetComponent <Canvas>();
                angle    = mySettings.Angle;
            }
        }
        public CurvedUISettings FindParentSettings(bool forceNew = false)
        {
            if (mySettings == null || forceNew)
            {
                mySettings = GetComponentInParent <CurvedUISettings>();

                if (mySettings == null)
                {
                    return(null);
                }
                else
                {
                    myCanvas = mySettings.GetComponent <Canvas>();
                }
            }

            return(mySettings);
        }