Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 19 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,11 @@ Untold Engine is designed for developers who:

This is not a drag-and-drop editor-first engine — it is a **code-driven engine for developers who want to understand and shape the system**.

Check out these videos to see the engine capabilities using the Vision Pro

[Cartoon City Rendering](https://vimeo.com/1176823067?share=copy&fl=sv&fe=ci)

[Game Dungeon](https://vimeo.com/1176823994?share=copy&fl=sv&fe=ci)

Creator & Lead Developer:
http://www.haroldserrano.com
Expand Down Expand Up @@ -126,20 +131,9 @@ Untold Engine aims to support applications such as:

---

# Engine Architecture:

- [Rendering System](docs/Architecture/renderingSystem.md)
- [XR Rendering System](docs/Architecture/xrRenderingSystem.md)
- [Static Batching System](docs/Architecture/batchingSystem.md)
- [Geometry Streaming System](docs/Architecture/geometryStreamingSystem.md)
- [LOD System](docs/Architecture/lodSystem.md)
- [Progressive Asset Loader](docs/Architecture/progressiveAssetLoader.md)
- [Streaming Cache Lifecycle](docs/Architecture/streamingCacheLifecycle.md)
- [Texture Streaming System](docs/Architecture/textureStreamingSystem.md)
- [Out of Core](docs/Architecture/outOfCore.md)

# Engine API

- [Getting Started](docs/API/GettingStarted.md)
- [Registration System](docs/API/UsingRegistrationSystem.md)
- [Scenegraph](docs/API/UsingScenegraph.md)
- [Transform System](docs/API/UsingTransformSystem.md)
Expand All @@ -161,6 +155,19 @@ Untold Engine aims to support applications such as:
- [Spatical Debugger](docs/API/SpatialDebugger.md)
- [Profiler](/docs/API/UsingProfiler.md)


# Engine Architecture:

- [Rendering System](docs/Architecture/renderingSystem.md)
- [XR Rendering System](docs/Architecture/xrRenderingSystem.md)
- [Static Batching System](docs/Architecture/batchingSystem.md)
- [Geometry Streaming System](docs/Architecture/geometryStreamingSystem.md)
- [LOD System](docs/Architecture/lodSystem.md)
- [Progressive Asset Loader](docs/Architecture/progressiveAssetLoader.md)
- [Streaming Cache Lifecycle](docs/Architecture/streamingCacheLifecycle.md)
- [Texture Streaming System](docs/Architecture/textureStreamingSystem.md)
- [Out of Core](docs/Architecture/outOfCore.md)

---

# Set Up an Xcode Project with Untold Engine
Expand Down
23 changes: 7 additions & 16 deletions Sources/DemoGame/GameScene.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
/// Core Engine API map used by this demo:
/// - Entity lifecycle: `createEntity`, `setEntityName`, `destroyAllEntities`
/// - Camera/input: `createGameCamera`, `findGameCamera`, `moveCameraWithInput`, `orbitCameraAround`
/// - Asset loading: `setEntityMeshAsync`
/// - Asset loading: `loadScene`
/// - Performance features: `setEntityStaticBatchComponent`, `enableBatching`, `generateBatches`, `enableStreaming`
/// - Debug overlays: `setLODLevelDebug`, `setTextureStreamingTierDebug`, `setOctreeLeafBoundsDebug`
final class GameScene {
Expand Down Expand Up @@ -55,28 +55,19 @@
// MARK: - Asset Loading

extension GameScene {
/// Loads a USDZ file into the scene, replacing any previously loaded model.
///
/// Asset load lifecycle contract:
/// 1. `destroyAllEntities` completion means teardown is finished; only then rebuild scene entities.
/// 2. `setEntityMeshAsync` completion means mesh loading/streaming setup is complete; only then update UI.
/// Loads a USDZ file into the scene, replacing whatever was previously loaded.
/// destroyAllEntities, mesh loading, and default camera/light creation are all
/// handled internally by loadScene — no manual teardown needed here.
func loadFile(path: String, completion: @escaping (Bool) -> Void) {
clearSceneBatches()
loadedEntity = nil

destroyAllEntities { [weak self] in
loadScene(filename: path, withExtension: Constants.usdzExtension) { [weak self] success in
guard let self else { return }
setupDefaultSceneObjects()

loadedEntity = findEntity(name: path)
let camera = findGameCamera()
setOrbitOffset(entityId: camera, uTargetOffset: Constants.orbitTargetOffset)

let entity = createEntity()
loadedEntity = entity

setEntityMeshAsync(entityId: entity, filename: path, withExtension: Constants.usdzExtension) { isOutOfCore in
completion(isOutOfCore)
}
completion(success)
}
}
}
Expand Down
Loading
Loading