Ejemplo n.º 1
0
        /// <summary>
        /// Shows the size map.
        /// </summary>
        public void ShowSizeMap()
        {
            List <string> targetAssets = new List <string>();

            string[] guids = Selection.assetGUIDs;

            for (int i = 0, length = guids.Length; i < length; ++i)
            {
                string   guid      = guids[i];
                string   assetPath = AssetDatabase.GUIDToAssetPath(guid);
                string[] paths     = Utils.EditorUtil.GetObjectAssets(assetPath);

                if (paths != null)
                {
                    targetAssets.AddRange(paths);
                }
            }

            assets = GenerateAssetsList(targetAssets, out totalRuntimeMemorySize, out totalStorageMemorySize);

            if (targetAssets.Count == 0)
            {
                QuickUnityEditorApplication.DisplaySimpleDialog("", DialogMessages.NoAssetDialog);
            }

            Repaint();
        }
Ejemplo n.º 2
0
 /// <summary>
 /// This function is called when the scriptable object will be destroyed.
 /// </summary>
 private void OnDestroy()
 {
     QuickUnityEditorApplication.SetEditorConfigValue <int>("TransformEditor", "selectedSpaceIndex", selectedIndex);
 }
Ejemplo n.º 3
0
 /// <summary>
 /// This function is called when the ScriptableObject script is started.
 /// </summary>
 private void Awake()
 {
     selectedIndex = QuickUnityEditorApplication.GetEditorConfigValue <int>("TransformEditor", "selectedSpaceIndex");
 }