/// <inheritdoc /> public override bool TryOverrideSettings(object settings) { if (settings is ModelImportSettings o) { _settings = o; return(true); } return(false); }
/// <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); }
/// <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); }
/// <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); }
/// <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); }