Small PSA:
Upgrading from older Sentis versions throws some errors right now. Pretty reproducible for me.
First, after I upgrade a project to Sentis v2.0.0 from an older version, I get:
Restarting the project fixes the above issue, but all .onnx assets still show the following import error. (Happens for all models)
InvalidOperationException: Failed to add object of type `ModelAssetWeightsData`. Check that the definition is in a file of the same name and that it compiles properly.
UnityEditor.AssetImporters.AssetImportContext.AddObjectToAsset (System.String identifier, UnityEngine.Object obj) (at <97436df440ca462884c5332c1d8ebbe7>:0)
Unity.Sentis.ONNXModelImporter.OnImportAsset (UnityEditor.AssetImporters.AssetImportContext ctx) (at ./Library/PackageCache/com.unity.sentis@2.0.0/Editor/ONNX/ONNXModelImporter.cs:76)
UnityEditor.AssetImporters.ScriptedImporter.GenerateAssetData (UnityEditor.AssetImporters.AssetImportContext ctx) (at <97436df440ca462884c5332c1d8ebbe7>:0)
Asset import failed, "Assets/EasyOCR/1_recognition_model.onnx" > InvalidOperationException: Failed to add object of type `ModelAssetWeightsData`. Check that the definition is in a file of the same name and that it compiles properly.
UnityEditor.AssetImporters.AssetImportContext.AddObjectToAsset (System.String identifier, UnityEngine.Object obj) (at <97436df440ca462884c5332c1d8ebbe7>:0)
Unity.Sentis.ONNXModelImporter.OnImportAsset (UnityEditor.AssetImporters.AssetImportContext ctx) (at ./Library/PackageCache/com.unity.sentis@2.0.0/Editor/ONNX/ONNXModelImporter.cs:76)
UnityEditor.AssetImporters.ScriptedImporter.GenerateAssetData (UnityEditor.AssetImporters.AssetImportContext ctx) (at <97436df440ca462884c5332c1d8ebbe7>:0)
To fix it, I need to go to Project View, right-click ‘Assets’ → Reimport All
(equivalent to deleting the Library folder)