Skip to content

Commit

Permalink
create default GLTFImportContext in runtime
Browse files Browse the repository at this point in the history
  • Loading branch information
pfcDorn committed Sep 28, 2023
1 parent 7fcc512 commit 99a35dd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Runtime/Scripts/GLTFSceneImporter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public class ImportOptions
#if UNITY_EDITOR
public GLTFImportContext ImportContext = new GLTFImportContext(null, new List<GltfImportPluginContext>());
#else
public GLTFImportContext ImportContext;
public GLTFImportContext ImportContext = new GLTFImportContext(new List<GltfImportPluginContext>());
#endif

[NonSerialized]
Expand Down
4 changes: 4 additions & 0 deletions Runtime/Scripts/Plugins/ImportContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ internal GLTFImportContext(AssetImportContext assetImportContext, IReadOnlyList<
SourceImporter = AssetImporter.GetAtPath(assetImportContext.assetPath);
}
#endif
internal GLTFImportContext(IReadOnlyList<GltfImportPluginContext> plugins)
{
Plugins = plugins;
}
}

public interface IGLTFImportRemap
Expand Down

0 comments on commit 99a35dd

Please sign in to comment.