babylon.js how to get access to a mesh outside of it's function
问题 I just cant get access to the babylon mesh. Everytime I try to run the code I get this error. I've tried it with two different approaches: Example 1: var carTest; BABYLON.SceneLoader.ImportMesh("", "assets/", "car.obj", scene, function(object) { carTest = object[0]; }); carTest.position.x = 10; Example 2: var carTest = BABYLON.SceneLoader.ImportMesh("", "assets/", "car.obj", scene); carTest.position.x = 10; 回答1: In your example 2, The BABYLON.SceneLoader.ImportMesh return Nullable