Sergey

  • 12 nov. 2024
  • Inscrit 3 avr. 2024
  • Harald

    No, I have not received any warnings.
    I thought that it might not be displayed, as AssetDatabase.CreateAsset() is called through your handler.
    I did not continue investigating the problem. I implemented a workaround using a preprocessor.

    • I think for now I will use a workaround with OnWillCreateAsset(string assetName). All created objects come there, without exceptions.

      • Harald
        Yes, the issue persists. It seems like these are unrelated cases.
        We've opted out of Parallel Importing in our project in favor of working presets.

        Regarding adding multiple animations simultaneously. SkeletonData is created from OnPostprocessAllAssets using the AssetDatabase.CreateAsset method. This method CreateAsset in the code has an attribute with a comment:
        "[PreventExecutionInState(AssetDatabasePreventExecution.kImportingAsset, PreventExecutionSeverity.PreventExecution_Warning, "AssetDatabase.CreateAsset() was called as part of running an import. Please make sure this function is not called from ScriptedImporters or PostProcessors, as it is a source of non-determinism and will be disallowed in a forthcoming release.")]"

        I believe this is exactly what prevents my code from executing when adding each animation. I attach a photo of my code.

          • Modifié

          Harald
          I have a problem with this approach when I transfer two or more animation folders into the project. OnPostprocessAllAssets catches only the last created _SkeletonData.asset. The rest of the created _SkeletonData.asset files do not trigger this callback.

          Unity version 2022.3.22f1

        • When enabling the setting in Unity Project Settings>Editor>Parallel Import,
          Animation import presets stop working. Apply Atlas Texture Settings toggle becomes useless.