Esempio n. 1
0
    static void Init()
    {
        FixScripts window = CreateInstance <FixScripts>();

                #if (UNITY_5_X)
        window.titleContent = new GUIContent("FixScripts");
                #endif
        window.minSize = new Vector2(300.0f, 145.0f);
        window.Show();
    }
Esempio n. 2
0
 private static void OnPostprocessAllAssets(string[] importedAssets, string[] deletedAssets, string[] movedAssets, string[] movedFromAssetPaths)
 {
                             #if (UNITY_5_X)
     IEnumerable <MonoScript> assets = (from path in importedAssets.Union(movedAssets) where AssetDatabase.LoadAssetAtPath <Object>(path) is MonoScript select AssetDatabase.LoadAssetAtPath <Object>(path) as MonoScript);
                             #else
     IEnumerable <MonoScript> assets = (from path in importedAssets.Union(movedAssets) where Resources.LoadAssetAtPath <Object>(path) is MonoScript select Resources.LoadAssetAtPath <Object>(path) as MonoScript);
                             #endif
     if (assets.Count() > 0)
     {
         foreach (var asset in assets)
         {
             FixScripts.Fix(asset);
         }
         AssetDatabase.Refresh();
     }
 }