コード例 #1
0
        /// <summary> Loads a rect transform from memory as position, rotation, and scale. </summary>
        /// <param name="data">The transform to load data into.</param>
        /// <param name="path">The path to load from.</param>
        public static void LoadRectTransform(RectTransform data, string path)
        {
            ES_RectTransformData tData = Load <ES_RectTransformData>(path);

            rectTransformLoads.Add(new ES_RectTransformLoad {
                target = data, data = tData
            });
        }
コード例 #2
0
        /// <summary> Loads a rect transform from memory as position, rotation, and scale. </summary>
        /// <param name="data">The transform to load data into.</param>
        /// <param name="key">The key to load from.</param>
        public static void LoadRectTransformWeb(RectTransform data, string key)
        {
            ES_RectTransformData tData = LoadWeb <ES_RectTransformData>(key);

            rectTransformLoads.Add(new ES_RectTransformLoad {
                target = data, data = tData
            });
        }
コード例 #3
0
        /// <summary> Saves a rect transform into memory as position, rotation, and scale. </summary>
        /// <param name="data">The transform to save.</param>
        /// <param name="key">The key to save to.</param>
        public static void SaveRectTransformWeb(RectTransform data, string key)
        {
            ES_RectTransformData tData = new ES_RectTransformData {
                anchoredPosition = data.anchoredPosition, eulerAngles = data.eulerAngles, sizeDelta = data.sizeDelta
            };

            SaveWeb(tData, key);
        }