示例#1
0
        public static void ResetProjectPackagesToEditorDefaults()
        {
            ResetToEditorDefaultsRequest request = Client.ResetToEditorDefaults();

            if (request.Status == StatusCode.Failure)
            {
                Debug.LogError("Resetting your project's packages to the editor's default configuration failed. Reason: " + request.Error.message);
            }
        }
示例#2
0
 public static void ResetProjectPackagesToEditorDefaults()
 {
     if (EditorUtility.DisplayDialog(L10n.Tr("Unity Package Manager"),
                                     L10n.Tr("Resetting packages to defaults will discard any changes you have made and/or remove packages set by the project template.\nThis action may result in compilation errors or a broken project. Are you sure?"),
                                     L10n.Tr("Yes"), L10n.Tr("No")))
     {
         ResetToEditorDefaultsRequest request = Client.ResetToEditorDefaults();
         if (request.Status == StatusCode.Failure)
         {
             Debug.LogError("Resetting packages to defaults failed. Reason: " + request.Error.message);
         }
     }
 }