Dunno that this scene is 100+MB. Only transfer about 50MB over network for me. And the demo is to show using the Unity Ecosystem to create a gltf. Mainly using Unity Terrain Builder with 7 different terrain textures that were splatted to paint the detail you see on the terrain, export a robot character using the Unity Starter asset with animation controller and blend tree animations smoothly transition walk, run, jump, falling and multiple landing animations… All with V2 havok physics for the terrain and a dynamic character controller for player movement. And all the OUT-THE-BOX and not even typing one single line of code for anything including the complex physics setup using Pro Class script components.
As the playground shows… its all easily loaded as with asset manager or any other
babylon scene loading functions. Then of course you can add what ever logic you like using script components.
So its really about how you wanna build your game. I prefer to use the Unity Eco System And Tooling to create interactive gltf files and use script components to achieve the Unity style game mechanics for not things like Terrain Building, but lightmap baking, character animation, recast navigation mesh generation, detour path navigation, auto lod, all the unity colliders including wheel colliders for raycast vehicle. You can setup entire open worlds or very large cities with thousands of building and road colliders. Then export all that as an interactive gltf with all that pre-built functionality that you load into your project, no matter if use my scene viewer or your own project.
The following Unity Starter Asset Playground show an example of how to use this interactive gltf in your own project. By loading a main level with all the fixings, lighting, skybox, environment, fog, etc. And a player character with two very powerful components on it. A UNITY.CharacterController and a UNITY.AnimationState component. We then at runtime attach a 3RD Person Player Controller to show that you can do this from your own code, and use the demo asset to place whatever type player controller script to handle the overall movement of your character:
class Playground {
public static async CreateScene(engine: BABYLON.Engine, canvas: HTMLCanvasElement): Promise<BABYLON.Scene> {
// This initializes the babylon.toolkit.js runtime and the default unity.playground.js project script bundle
await UNITY.SceneManager.InitializePlayground(engine, { showDefaultLoadingScreen: true, hideLoadingUIWithEngine: false });
// This creates a basic babylon scene object (non-mesh)
var scene = new BABYLON.Scene(engine);
// This creates and positions a debug camera (non-mesh)
var camera = new BABYLON.FreeCamera("camera1", new BABYLON.Vector3(0, 5, -10), scene);
camera.setTarget(BABYLON.Vector3.Zero());
camera.attachControl(canvas, true);
// This creates ambient light, aiming 0,1,0 - to the sky (non-mesh)
var light = new BABYLON.HemisphericLight("light1", new BABYLON.Vector3(0, 1, 0), scene);
light.intensity = 0.8;
// This enables the havok physics engine
globalThis.HKP = new BABYLON.HavokPlugin();
scene.enablePhysics(new BABYLON.Vector3(0,-9.81,0), globalThis.HKP);
// This loads the sample scene & player armature exported from a unity starter assets project
// https://assetstore.unity.com/packages/essentials/starter-assets-character-controllers-urp-267961
const assetsManager:BABYLON.AssetsManager = new BABYLON.AssetsManager(scene);
assetsManager.addMeshTask("samplescene", null, UNITY.SceneManager.PlaygroundRepo, "samplescene.gltf");
assetsManager.addMeshTask("playerarmature", null, UNITY.SceneManager.PlaygroundRepo, "playerarmature.gltf");
await UNITY.SceneManager.LoadRuntimeAssets(assetsManager, ["samplescene.gltf", "playerarmature.gltf"], ()=> Playground.OnSceneReady(scene));
return scene;
}
private static OnSceneReady(scene:BABYLON.Scene):void {
// This get the play armature transform node from scene hierarchy
const player = scene.getNodeByName("PlayerArmature") as BABYLON.TransformNode;
// This instantiates a third person player controller script component from the babylon toolkit starter content package
const controller = new PROJECT.ThirdPersonPlayerController(player, scene, { arrowKeyRotation: true, smoothMotionSpeed:true, smoothChangeRate: 25.0 });
controller.enableInput = true;
controller.attachCamera = true;
controller.boomPosition.set(0, 0, -5);
controller.moveSpeed = 5.335;
controller.walkSpeed = 2.0;
controller.jumpSpeed = 12.0;
UNITY.SceneManager.AttachScriptComponent(controller, "PROJECT.ThirdPersonPlayerController");
// This finally hides the playground screen loader
UNITY.SceneManager.HideLoadingScreen(engine);
UNITY.SceneManager.FocusRenderCanvas(scene);
}
}
Anyways, sorry about the long winded response. But in short, you use the toolkit to make interactive gltf files that you load in your normal project. How interactive you make it is your choice. Can be an entire game or levels and individual assets. Its up to you.
But I cant see any other Game IDE for BabylonJS that lets do all that. I use it every day for work (most of which is under NDA so I cant show demos of the project without written permission from the client). But here is an older prototype that MVRK Dev Team including @Pryme8 made with the toolkit. MVRK Racer
Note: the networking server is down so stick to solo play. My newer shit way better quality. just cant show it right now