Skip to content

Commit

Permalink
Merge pull request #41 from asus4/fix-ort-importer
Browse files Browse the repository at this point in the history
Fix ort importer
  • Loading branch information
asus4 authored Jan 25, 2025
2 parents c6c3e49 + add1eac commit 017209a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
4 changes: 4 additions & 0 deletions com.github.asus4.onnxruntime.unity/Editor/OrtImporter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,11 @@ namespace Microsoft.ML.OnnxRuntime.Unity.Editor
/// Sentis in installed and want to import the onnx model as OrtAsset,
/// Select importer the dropdown of the onnx asset
/// </summary>
#if ORT_UNITY_SENTIS_ENABLED
[ScriptedImporter(1, new[] { "ort" }, new[] { "onnx" })]
#else
[ScriptedImporter(1, new[] { "ort", "onnx" })]
#endif // ORT_UNITY_SENTIS_ENABLED
public class OrtImporter : ScriptedImporter
{
public override void OnImportAsset(AssetImportContext ctx)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,12 @@
"precompiledReferences": [],
"autoReferenced": true,
"defineConstraints": [],
"versionDefines": [],
"versionDefines": [
{
"name": "com.unity.sentis",
"expression": "",
"define": "ORT_UNITY_SENTIS_ENABLED"
}
],
"noEngineReferences": false
}

0 comments on commit 017209a

Please sign in to comment.