コード例 #1
0
ファイル: SizeMap.cs プロジェクト: superowner/QuickUnity
        /// <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();
        }
コード例 #2
0
 /// <summary>
 /// This function is called when the scriptable object will be destroyed.
 /// </summary>
 private void OnDestroy()
 {
     QuickUnityEditorApplication.SetEditorConfigValue <int>("TransformEditor", "selectedSpaceIndex", selectedIndex);
 }
コード例 #3
0
 /// <summary>
 /// This function is called when the ScriptableObject script is started.
 /// </summary>
 private void Awake()
 {
     selectedIndex = QuickUnityEditorApplication.GetEditorConfigValue <int>("TransformEditor", "selectedSpaceIndex");
 }