Example #1
0
 protected void DrawProposeTips(ResInfo refInfo)
 {
     if (refInfo.proposeTipCount > 0)
     {
         if (GUILayout.Button("建议", GUILayout.Width(100)))
         {
             EditTools.PingAssetInProject(refInfo.path);
             EditorUtility.DisplayDialog("Tips", refInfo.GetResInfoDetails(), "OK");
         }
     }
 }
        protected void DrawProposeTips(ResInfo refInfo)
        {
            if (refInfo.proposeTipCount > 0)
            {
                if (GUILayout.Button("建议", GUILayout.Width(100)))
                {
                    EditTools.PingAssetInProject(refInfo.path);
                    EditorUtility.DisplayDialog("Tips", refInfo.GetResInfoDetails(), "OK");
                }

            }
        }
        public static void ProjectAnalyzerView()
        {
            UnityEngine.Object asset     = Selection.activeGameObject;
            string             assetPath = AssetDatabase.GetAssetPath(asset);
            ResInfo            refInfo   = null;

            if (asset is Texture)
            {
                refInfo = new TextureInfo(asset as Texture, assetPath);
            }
            else
            {
                ModelImporter mi = AssetImporter.GetAtPath(assetPath) as ModelImporter;
                if (mi != null)
                {
                    refInfo = new ModelInfo(mi, assetPath);
                }
            }

            if (refInfo != null)
            {
                EditorUtility.DisplayDialog("Tips", refInfo.GetResInfoDetails(), "OK");
            }
        }