Example #1
0
 /// <inheritdoc />
 public override bool TryOverrideSettings(object settings)
 {
     if (settings is ModelImportSettings o)
     {
         _settings = o;
         return(true);
     }
     return(false);
 }
Example #2
0
 /// <summary>
 /// Tries the restore the asset import options from the target resource file.
 /// </summary>
 /// <param name="options">The options.</param>
 /// <param name="assetPath">The asset path.</param>
 /// <returns>True settings has been restored, otherwise false.</returns>
 public static bool TryRestore(ref ModelImportSettings options, string assetPath)
 {
     if (ModelImportEntry.Internal_GetModelImportOptions(assetPath, out var internalOptions))
     {
         // Restore settings
         options.FromInternal(ref internalOptions);
         return(true);
     }
     return(false);
 }
Example #3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ModelImportEntry"/> class.
 /// </summary>
 /// <param name="request">The import request.</param>
 public ModelImportEntry(ref Request request)
     : base(ref request)
 {
     // Try to restore target asset model import options (useful for fast reimport)
     ModelImportSettings.TryRestore(ref _settings, ResultUrl);
 }
Example #4
0
 /// <summary>
 /// Tries the restore the asset import options from the target resource file. Applies the project default options too.
 /// </summary>
 /// <param name="options">The options.</param>
 /// <param name="assetPath">The asset path.</param>
 /// <returns>True settings has been restored, otherwise false.</returns>
 public static void TryRestore(ref ModelImportSettings options, string assetPath)
 {
     ModelImportEntry.Internal_GetModelImportOptions(assetPath, out var internalOptions);
     options.FromInternal(ref internalOptions);
 }
Example #5
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ModelImportEntry"/> class.
 /// </summary>
 /// <param name="url">The source file url.</param>
 /// <param name="resultUrl">The result file url.</param>
 public ModelImportEntry(string url, string resultUrl)
     : base(url, resultUrl)
 {
     // Try to restore target asset model import options (useful for fast reimport)
     ModelImportSettings.TryRestore(ref _settings, resultUrl);
 }