UnityEditor.AssetImporterInspector.ImportAssets C# (CSharp) Method

ImportAssets() private static method

private static ImportAssets ( string paths ) : void
paths string
return void
        private static void ImportAssets(string[] paths)
        {
            foreach (string str in paths)
            {
                AssetDatabase.WriteImportSettingsIfDirty(str);
            }
            try
            {
                AssetDatabase.StartAssetEditing();
                foreach (string str2 in paths)
                {
                    AssetDatabase.ImportAsset(str2);
                }
            }
            finally
            {
                AssetDatabase.StopAssetEditing();
            }
        }

Usage Example

示例#1
0
 internal void ApplyAndImport()
 {
     this.Apply();
     this.m_MightHaveModified = false;
     AssetImporterInspector.ImportAssets(this.GetAssetPaths());
     this.ResetValues();
 }
All Usage Examples Of UnityEditor.AssetImporterInspector::ImportAssets