コード例 #1
0
        void FindParentSettings()
        {
            if (mySettings == null)
            {
                mySettings = GetComponentInParent <CurvedUISettings>();

                if (mySettings == null)
                {
                    return;
                }

                myCanvas = mySettings.GetComponent <Canvas>();
                angle    = mySettings.Angle;
            }
        }
コード例 #2
0
        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);
        }