Skip to content

Commit

Permalink
Use glTFast material for runtime load
Browse files Browse the repository at this point in the history
  • Loading branch information
from2001 committed May 11, 2024
1 parent b74fb9e commit 7219a82
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,11 @@ private async UniTask<GameObject> LoadGltfWithURL(string URL, GameObject target
if (httpResponse.IsSuccessful)
{
GlbBytes = httpResponse.Bytes;
GLTFast.Materials.IMaterialGenerator materialGenerator = Utils.IsVisionOS() ? new PBRGraphMaterialGenerator(new MemoryStream(GlbBytes)) : null;

// Use glTfast materials since PBRGraphMaterialGenerator is broken.
// GLTFast.Materials.IMaterialGenerator materialGenerator = Utils.IsVisionOS() ? new PBRGraphMaterialGenerator(new MemoryStream(GlbBytes)) : null;
GLTFast.Materials.IMaterialGenerator materialGenerator = null;

var gltfImport = new GltfImport(null, null, materialGenerator, null);
var instantiator = new GameObjectInstantiator(gltfImport, gltfInstance.transform);

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "com.from2001.gltfast-visualscripting-nodes",
"version": "0.1.1",
"version": "0.1.2",
"displayName": "glTFast Visual Scripting Nodes",
"description": "Unity Visual Scripting node library for glTF",
"unity": "2021.3",
Expand Down

0 comments on commit 7219a82

Please sign in to comment.