A fast 2D and 3D game engine — TypeScript SDK, C++/WebAssembly core, visual editor. Ship one project to web, desktop, WeChat MiniGames, playable ads, and native Android / iOS.
TypeScript 2d-game-engine3d3d-game-engineandroidcppecsgame-editorgame-enginegamedeviostypescriptwebassemblywebglwebgpuwechat-minigame
fix: add post-process plugin to editor and resolve UUID asset references
esengine94786f451547
diff --git a/editor/src/builder/ArtifactBuilder.ts b/editor/src/builder/ArtifactBuilder.tsindex 37b3f263d..7e5a57bf2 100644--- a/editor/src/builder/ArtifactBuilder.ts+++ b/editor/src/builder/ArtifactBuilder.ts@@ -20,7 +20,7 @@ import type { PrefabData } from '../types/PrefabTypes';import { toBuildPath, getComponentAssetFieldDescriptors, getComponentDefaults, registerAssetBuildTransform } from 'esengine';import { normalizePath, joinPath, isAbsolutePath, getParentDir } from '../utils/path';import { getEsbuildWasmURL } from '../context/EditorContext';-import { getSettingsValue } from '../settings';+import { getSettingsValue } from '../settings/SettingsRegistry';// =============================================================================// buildArtifactdiff --git a/editor/src/builder/PlayableEmitter.ts b/editor/src/builder/PlayableEmitter.tsindex a98f9d2ad..92bdd9a21 100644--- a/editor/src/builder/PlayableEmitter.ts+++ b/editor/src/builder/PlayableEmitter.ts@@ -44,6 +44,7 @@ const COMPONENT_TO_PLUGIN: Record<string, string> = {'ParticleEmitter': 'particlePlugin','Tilemap': 'tilemapPlugin','TilemapLayer': 'tilemapPlugin',+ 'PostProcessVolume': 'postProcessPlugin',};function analyzeUsedPlugins(artifact: BuildArtifact): string[] {@@ -237,13 +238,14 @@ export class PlayableEmitter implements PlatformEmitter {const pluginList = allPlugins.join(', ');const entryContent = `-import { createWebApp as _cwa, initPlayableRuntime, ${pluginImports} } from 'esengine';+import { createWebApp as _cwa, initPlayableRuntime, RuntimeConfig, ${pluginImports} } from 'esengine';${imports}const __plugins = [${pluginList}];(window as any).esengine = {createWebApp: (m: any, o?: any) => _cwa(m, { plugins: __plugins, ...o }),initPlayableRuntime,+ RuntimeConfig,};`;diff --git a/editor/src/panels/inspector/AnimClipInspector.ts b/editor/src/panels/inspector/AnimClipInspector.tsindex 1408d9c12..452970422 100644--- a/editor/src/panels/inspector/AnimClipInspector.ts+++ b/editor/src/panels/inspector/AnimClipInspector.ts@@ -2,6 +2,7 @@ import { icons } from '../../utils/icons';import { getNativeFS, getFileName, renderError, getAssetServer } from './InspectorHelpers';import { getPlatformAdapter } from '../../platform/PlatformAdapter';import { getGlobalPathResolver } from '../../asset';+import { getAssetDatabase, isUUID } from '../../asset/AssetDatabase';interface AnimClipAssetData {version: string;@@ -16,9 +17,17 @@ const MAX_FPS = 60;interface FrameInfo {texture: string;+ displayPath: string;thumbnailUrl: string | null;}+function resolveTexturePath(ref: string): string {+ if (isUUID(ref)) {+ return getAssetDatabase().getPath(ref) ?? ref;+ }+ return ref;+}+export async function renderAnimClipInspector(container: HTMLElement, path: string): Promise<void> {const platform = getPlatformAdapter();@@ -37,6 +46,7 @@ export async function renderAnimClipInspector(container: HTMLElement, path: striconst frames: FrameInfo[] = data.frames.map(f => ({texture: f.texture,+ displayPath: resolveTexturePath(f.texture),thumbnailUrl: null,}));@@ -121,7 +131,7 @@ function renderSection(const resolver = getGlobalPathResolver();const projectDir = resolver.getProjectDir();if (!projectDir) continue;- state.frames.push({ texture: file.name, thumbnailUrl: null });+ state.frames.push({ texture: file.name, displayPath: file.name, thumbnailUrl: null });}await save(state, filePath);renderSection(section, state, filePath);@@ -147,7 +157,7 @@ function renderFrameList(frames: FrameInfo[]): string {: `<span class="es-animclip-frame-index">${String(i).padStart(2, '0')}</span>`}</div>- <span class="es-animclip-frame-name" title="${frame.texture}">${getFileName(frame.texture)}</span>+ <span class="es-animclip-frame-name" title="${frame.displayPath}">${getFileName(frame.displayPath)}</span><button class="es-btn es-btn-icon es-animclip-delete-btn" data-index="${i}" title="Remove frame">${icons.x(12)}</button>@@ -221,7 +231,7 @@ function setupDropZone(const resolver = getGlobalPathResolver();for (const asset of imageAssets) {const relativePath = resolver.toRelativePath(asset.path);- state.frames.push({ texture: relativePath, thumbnailUrl: null });+ state.frames.push({ texture: relativePath, displayPath: relativePath, thumbnailUrl: null });}await save(state, filePath);@@ -248,7 +258,7 @@ async function loadThumbnails(const frame = state.frames[i];if (frame.thumbnailUrl) continue;- const absPath = resolver.toAbsolutePath(frame.texture);+ const absPath = resolver.toAbsolutePath(frame.displayPath);try {const data = await fs.readBinaryFile(absPath);if (!data) continue;diff --git a/editor/src/renderer/EditorTextureManager.ts b/editor/src/renderer/EditorTextureManager.tsindex 54612e8d0..cd6658418 100644--- a/editor/src/renderer/EditorTextureManager.ts+++ b/editor/src/renderer/EditorTextureManager.ts@@ -6,6 +6,7 @@import type { ESEngineModule } from 'esengine';import { parseTextureMetadata, getMetaFilePath } from '../types/TextureMetadata';import type { AssetPathResolver } from '../asset';+import { getAssetDatabase, isUUID } from '../asset/AssetDatabase';import { getEditorContext } from '../context/EditorContext';import type { NativeFS } from '../types/NativeFS';@@ -42,6 +43,13 @@ export class EditorTextureManager {async loadTexture(texturePath: string): Promise<number> {if (!texturePath || /^\d+$/.test(texturePath)) return 0;+ if (isUUID(texturePath)) {+ const resolved = getAssetDatabase().getPath(texturePath);+ if (resolved) {+ texturePath = resolved;+ }+ }+const fullPath = this.pathResolver_.toAbsolutePath(texturePath);const existing = this.pathToEntry_.get(fullPath);diff --git a/editor/src/renderer/SharedRenderContext.ts b/editor/src/renderer/SharedRenderContext.tsindex 03bdebda3..4b4125b30 100644--- a/editor/src/renderer/SharedRenderContext.ts+++ b/editor/src/renderer/SharedRenderContext.ts@@ -31,6 +31,7 @@ import {particlePlugin,tilemapPlugin,sceneManagerPlugin,+ postProcessPlugin,} from 'esengine';import { PhysicsPlugin, type PhysicsPluginConfig } from 'esengine/physics';import type { SpineModuleController } from 'esengine/spine';@@ -167,6 +168,7 @@ export class SharedRenderContext {app.addPlugin(particlePlugin);app.addPlugin(tilemapPlugin);app.addPlugin(sceneManagerPlugin);+ app.addPlugin(postProcessPlugin);for (const plugin of uiPlugins) {app.addPlugin(plugin);}diff --git a/editor/src/schemas/ComponentSchemas.ts b/editor/src/schemas/ComponentSchemas.tsindex 88b6f93c0..5aeda6d74 100644--- a/editor/src/schemas/ComponentSchemas.ts+++ b/editor/src/schemas/ComponentSchemas.ts@@ -5,7 +5,7 @@import type { PropertyMeta } from '../property/PropertyEditor';import { getComponentDefaults } from 'esengine';-import { getSettingsValue } from '../settings';+import { getSettingsValue } from '../settings/SettingsRegistry';// =============================================================================// Types