Ver código fonte

add a check in the inspector to detect gltf loader presence

David Catuhe 6 anos atrás
pai
commit
aeb1a4a5ca

+ 4 - 1
inspector/src/components/actionTabs/tabs/toolsTabComponent.tsx

@@ -125,7 +125,10 @@ export class ToolsTabComponent extends PaneComponent {
                         <ButtonLineComponent label="Generate .env texture" onClick={() => this.createEnvTexture()} />
                     }
                 </LineContainerComponent>
-                <GLTFComponent scene={scene} globalState={this.props.globalState!} />
+                {
+                    (BABYLON as any).GLTFFileLoader &&
+                    <GLTFComponent scene={scene} globalState={this.props.globalState!} />
+                }
             </div>
         );
     }