Babylon objects not executing

I am having a weird problem. I am developing a react project that uses Babylonjs. On that project I am able to load objects into the scene. However, when I try to create a Material, in this case a PBR Material, it looks like the browser does not process the instantiation of the material. Problem is the following:

import ConnectionConstants from "../../Constants/ConnectionConstants.js";
import { PBRMaterial, Texture } from "@babylonjs/core";
import "@babylonjs/loaders";

function MaterialLoader(object, material, scene) {
  debugger;
  let pbrMaterial = new PBRMaterial("mat", scene);
  debugger;

When I call MaterialLoader the browser hits the first debugger, but doesn’t hit the second debugger. Basicly, all code south let pbrMaterial = new PBRMaterial("mat", scene); does not get executed.

Any clues why this is happening?

31 thoughts on “Babylon objects not executing”

Leave a Comment