UnityEditor.PackageImport.ValidateInput C# (CSharp) Method

ValidateInput() private static method

private static ValidateInput ( AssetsItem items ) : bool
items AssetsItem
return bool
        private static bool ValidateInput(AssetsItem[] items)
        {
            string str;
            if (!IsAllFilePathsValid(items, out str))
            {
                str = str + "\nDo you want to import the valid file paths of the package or cancel importing?";
                return EditorUtility.DisplayDialog("Invalid file path found", str, "Import", "Cancel importing");
            }
            return true;
        }

Usage Example

示例#1
0
 public static void ShowImportPackage(string packagePath, ImportPackageItem[] items, string packageIconPath, bool allowReInstall)
 {
     if (!PackageImport.ValidateInput(items))
     {
         return;
     }
     EditorWindow.GetWindow <PackageImport>(true, "Import Unity Package").Init(packagePath, items, packageIconPath, allowReInstall);
 }
All Usage Examples Of UnityEditor.PackageImport::ValidateInput