@nice2dev/game-engine 1.1.10 → 1.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +173 -0
- package/dist/cjs/ai/BehaviorTree.js +4 -4
- package/dist/cjs/audio/AudioBridge.js +3 -1
- package/dist/cjs/build-cloud/GodotBuildCloud.js +1 -1
- package/dist/cjs/build-cloud/UnrealBuildCloud.js +1 -1
- package/dist/cjs/core/GameConfig.js +11 -9
- package/dist/cjs/devtools/GameplayAnalytics.js +3 -1
- package/dist/cjs/editor/AnimationRetargeting.js +110 -108
- package/dist/cjs/editor/CraftingEditor.js +2 -2
- package/dist/cjs/editor/NiceGameEditor.js +1 -1
- package/dist/cjs/editor/UndoRedoPro.js +49 -47
- package/dist/cjs/export/BevyExporter.js +1 -1
- package/dist/cjs/export/CocosExporter.js +4 -4
- package/dist/cjs/export/Construct3Exporter.js +4 -4
- package/dist/cjs/export/DefoldExporter.js +4 -4
- package/dist/cjs/export/GDevelopExporter.js +2 -2
- package/dist/cjs/export/GameMakerExporter.js +3 -3
- package/dist/cjs/export/GodotExporter.js +3 -3
- package/dist/cjs/export/MinecraftBedrockExporter.js +2 -2
- package/dist/cjs/export/MonoGameExporter.js +2 -2
- package/dist/cjs/export/Pico8Exporter.js +6 -6
- package/dist/cjs/export/RPGMakerExporter.js +4 -4
- package/dist/cjs/export/RobloxExporter.js +5 -5
- package/dist/cjs/export/Solar2DExporter.js +2 -2
- package/dist/cjs/export/ThreeJSExporter.js +3 -3
- package/dist/cjs/export/Tic80Exporter.js +6 -6
- package/dist/cjs/export/UnityExporter.js +4 -4
- package/dist/cjs/export/UnrealExporter.js +7 -7
- package/dist/cjs/export/WebExporter.js +2 -2
- package/dist/cjs/godot-integration/components/GodotProjectBrowser.js +4 -4
- package/dist/cjs/i18n/useTranslation.js +1 -1
- package/dist/cjs/import/GodotSceneImporter.js +4 -4
- package/dist/cjs/import/LDtkImporter.js +1 -1
- package/dist/cjs/import/OgmoImporter.js +1 -1
- package/dist/cjs/import/TiledMapImporter.js +1 -1
- package/dist/cjs/input/GamepadNavigation.js +1 -1
- package/dist/cjs/inventory/InventorySystem.js +1 -1
- package/dist/cjs/native-engine/NetworkingSystem.js +1 -1
- package/dist/cjs/rendering/WebGPURenderPipeline.js +41 -30
- package/dist/cjs/unity-integration/UnityImport.js +2 -2
- package/dist/cjs/unity-integration/components/UnityAssetStoreBrowser.js +4 -4
- package/dist/cjs/unity-integration/components/UnityProjectBrowser.js +8 -5
- package/dist/cjs/unreal-integration/components/UnrealProjectBrowser.js +5 -5
- package/dist/esm/ai/BehaviorTree.js +4 -4
- package/dist/esm/audio/AudioBridge.js +3 -1
- package/dist/esm/build-cloud/GodotBuildCloud.js +1 -1
- package/dist/esm/build-cloud/UnrealBuildCloud.js +1 -1
- package/dist/esm/core/GameConfig.js +11 -9
- package/dist/esm/devtools/GameplayAnalytics.js +3 -1
- package/dist/esm/editor/AnimationRetargeting.js +110 -108
- package/dist/esm/editor/CraftingEditor.js +2 -2
- package/dist/esm/editor/NiceGameEditor.js +2 -2
- package/dist/esm/editor/UndoRedoPro.js +49 -47
- package/dist/esm/export/BevyExporter.js +1 -1
- package/dist/esm/export/CocosExporter.js +4 -4
- package/dist/esm/export/Construct3Exporter.js +4 -4
- package/dist/esm/export/DefoldExporter.js +4 -4
- package/dist/esm/export/GDevelopExporter.js +2 -2
- package/dist/esm/export/GameMakerExporter.js +3 -3
- package/dist/esm/export/GodotExporter.js +3 -3
- package/dist/esm/export/MinecraftBedrockExporter.js +2 -2
- package/dist/esm/export/MonoGameExporter.js +2 -2
- package/dist/esm/export/Pico8Exporter.js +6 -6
- package/dist/esm/export/RPGMakerExporter.js +4 -4
- package/dist/esm/export/RobloxExporter.js +5 -5
- package/dist/esm/export/Solar2DExporter.js +2 -2
- package/dist/esm/export/ThreeJSExporter.js +3 -3
- package/dist/esm/export/Tic80Exporter.js +6 -6
- package/dist/esm/export/UnityExporter.js +4 -4
- package/dist/esm/export/UnrealExporter.js +7 -7
- package/dist/esm/export/WebExporter.js +2 -2
- package/dist/esm/godot-integration/components/GodotProjectBrowser.js +5 -5
- package/dist/esm/i18n/useTranslation.js +2 -2
- package/dist/esm/import/GodotSceneImporter.js +4 -4
- package/dist/esm/import/LDtkImporter.js +1 -1
- package/dist/esm/import/OgmoImporter.js +1 -1
- package/dist/esm/import/TiledMapImporter.js +1 -1
- package/dist/esm/input/GamepadNavigation.js +2 -2
- package/dist/esm/inventory/InventorySystem.js +1 -1
- package/dist/esm/native-engine/NetworkingSystem.js +1 -1
- package/dist/esm/rendering/WebGPURenderPipeline.js +41 -30
- package/dist/esm/unity-integration/UnityImport.js +2 -2
- package/dist/esm/unity-integration/components/UnityAssetStoreBrowser.js +5 -5
- package/dist/esm/unity-integration/components/UnityProjectBrowser.js +9 -6
- package/dist/esm/unreal-integration/components/UnrealProjectBrowser.js +6 -6
- package/dist/types/ai/BehaviorTree.d.ts +4 -4
- package/dist/types/editor/CraftingEditor.d.ts +1 -1
- package/dist/types/godot-integration/components/GodotProjectBrowser.d.ts +3 -1
- package/dist/types/unity-integration/components/UnityAssetStoreBrowser.d.ts +3 -1
- package/dist/types/unity-integration/components/UnityProjectBrowser.d.ts +3 -1
- package/dist/types/unreal-integration/components/UnrealProjectBrowser.d.ts +3 -1
- package/package.json +5 -5
|
@@ -231,7 +231,7 @@ class UnrealExporter extends PlatformExporter.PlatformExporter {
|
|
|
231
231
|
};
|
|
232
232
|
this.addTextFile(`${projectName}.uproject`, JSON.stringify(uproject, null, 2));
|
|
233
233
|
}
|
|
234
|
-
async generateBuildFiles(
|
|
234
|
+
async generateBuildFiles(_project, _options) {
|
|
235
235
|
// Module Build.cs
|
|
236
236
|
const buildCs = `// Copyright Nice2Dev. All Rights Reserved.
|
|
237
237
|
|
|
@@ -332,7 +332,7 @@ IMPLEMENT_PRIMARY_GAME_MODULE(F${this.moduleName}Module, ${this.moduleName}, "${
|
|
|
332
332
|
this.generateActorClass(prefab.entity, prefab.name, options);
|
|
333
333
|
}
|
|
334
334
|
}
|
|
335
|
-
generateGameMode(project,
|
|
335
|
+
generateGameMode(project, _options) {
|
|
336
336
|
const className = `A${this.moduleName}GameMode`;
|
|
337
337
|
// Header
|
|
338
338
|
const header = `// Copyright Nice2Dev. All Rights Reserved.
|
|
@@ -413,7 +413,7 @@ void ${className}::StartPlay()
|
|
|
413
413
|
`;
|
|
414
414
|
this.addTextFile(`Source/${this.moduleName}/${this.moduleName}GameMode.cpp`, source);
|
|
415
415
|
}
|
|
416
|
-
generateActorClass(entity, className,
|
|
416
|
+
generateActorClass(entity, className, _options) {
|
|
417
417
|
const sanitizedName = className.replace(/[^a-zA-Z0-9]/g, '');
|
|
418
418
|
const fullClassName = `A${sanitizedName}`;
|
|
419
419
|
this.usedHeaders.clear();
|
|
@@ -571,7 +571,7 @@ void ${fullClassName}::OnNiceUpdate_Implementation(float DeltaTime)
|
|
|
571
571
|
}
|
|
572
572
|
return String(value);
|
|
573
573
|
}
|
|
574
|
-
async generateConfigFiles(project,
|
|
574
|
+
async generateConfigFiles(project, _options) {
|
|
575
575
|
// Default Engine.ini
|
|
576
576
|
const engineIni = `[/Script/EngineSettings.GameMapsSettings]
|
|
577
577
|
GameDefaultMap=/Game/Maps/MainMenu
|
|
@@ -603,7 +603,7 @@ DefaultGravityZ=${project.settings.physics?.gravity?.y ?? -980}
|
|
|
603
603
|
this.addTextFile('Config/DefaultGame.ini', gameIni);
|
|
604
604
|
}
|
|
605
605
|
/* ── Scene Export ───────────────────────────────────────────── */
|
|
606
|
-
async exportScene(scene, project,
|
|
606
|
+
async exportScene(scene, project, _options) {
|
|
607
607
|
// Generate level blueprint
|
|
608
608
|
const levelHeader = this.generateLevelBlueprint(scene, project);
|
|
609
609
|
this.addTextFile(`Content/Maps/${scene.name}_LevelScript.h`, levelHeader.header);
|
|
@@ -612,7 +612,7 @@ DefaultGravityZ=${project.settings.physics?.gravity?.y ?? -980}
|
|
|
612
612
|
const spawnData = this.generateSpawnData(scene);
|
|
613
613
|
this.addTextFile(`Content/Data/${scene.name}_SpawnData.json`, JSON.stringify(spawnData, null, 2));
|
|
614
614
|
}
|
|
615
|
-
generateLevelBlueprint(scene,
|
|
615
|
+
generateLevelBlueprint(scene, _project) {
|
|
616
616
|
const className = `A${scene.name.replace(/[^a-zA-Z0-9]/g, '')}LevelScript`;
|
|
617
617
|
const header = `// Copyright Nice2Dev. All Rights Reserved.
|
|
618
618
|
|
|
@@ -713,7 +713,7 @@ ${scene.entities.map((e) => this.generateEntitySpawnCode(e)).join('\n')}
|
|
|
713
713
|
};
|
|
714
714
|
}
|
|
715
715
|
/* ── Asset Export ───────────────────────────────────────────── */
|
|
716
|
-
async exportAsset(asset,
|
|
716
|
+
async exportAsset(asset, _options) {
|
|
717
717
|
switch (asset.type) {
|
|
718
718
|
case 'sprite':
|
|
719
719
|
case 'texture':
|
|
@@ -378,7 +378,7 @@ export default class ${sceneName}Scene ${useTS ? 'implements Scene' : ''} {
|
|
|
378
378
|
}
|
|
379
379
|
return code;
|
|
380
380
|
}
|
|
381
|
-
async exportScripts(project, options,
|
|
381
|
+
async exportScripts(project, options, _useTS) {
|
|
382
382
|
for (const script of project.scripts) {
|
|
383
383
|
try {
|
|
384
384
|
const ast = this.graphToAST.convert(script);
|
|
@@ -970,7 +970,7 @@ export class ${sceneName}Scene extends Phaser.Scene {
|
|
|
970
970
|
(scene.tilemaps ?? []).forEach((tm) => assetIds.add(tm.tilesetId));
|
|
971
971
|
return project.assets.filter((a) => assetIds.has(a.id));
|
|
972
972
|
}
|
|
973
|
-
async exportScripts(project, options,
|
|
973
|
+
async exportScripts(project, options, _useTS) {
|
|
974
974
|
for (const script of project.scripts) {
|
|
975
975
|
try {
|
|
976
976
|
const ast = this.graphToAST.convert(script);
|
|
@@ -93,7 +93,7 @@ const INITIAL_STATE = {
|
|
|
93
93
|
importProgress: 0,
|
|
94
94
|
tab: 'files',
|
|
95
95
|
};
|
|
96
|
-
const BrowserContext = React.createContext(null);
|
|
96
|
+
const BrowserContext = /* @__PURE__ */ React.createContext(null);
|
|
97
97
|
function useBrowser() {
|
|
98
98
|
const ctx = React.useContext(BrowserContext);
|
|
99
99
|
if (!ctx) {
|
|
@@ -581,7 +581,8 @@ const DEMO_PROJECT = {
|
|
|
581
581
|
{ name: 'Web Build', platform: 'Web' },
|
|
582
582
|
],
|
|
583
583
|
};
|
|
584
|
-
const GodotProjectBrowser =
|
|
584
|
+
const GodotProjectBrowser = /* @__PURE__ */ Object.assign(
|
|
585
|
+
/* @__PURE__ */ React.forwardRef(({ projectPath: _projectPath, theme: themeOverride, onProjectLoad, onImport, onSyncConnect, onSyncDisconnect, className, style, }, ref) => {
|
|
585
586
|
const [state, dispatch] = React.useReducer(browserReducer, {
|
|
586
587
|
...INITIAL_STATE,
|
|
587
588
|
projectInfo: DEMO_PROJECT,
|
|
@@ -663,7 +664,6 @@ const GodotProjectBrowser = React.forwardRef(({ projectPath: _projectPath, theme
|
|
|
663
664
|
overflow: 'hidden',
|
|
664
665
|
...style,
|
|
665
666
|
}, children: [jsxRuntime.jsx(BrowserHeader, {}), jsxRuntime.jsx(BrowserToolbar, {}), jsxRuntime.jsx(TabBar, {}), jsxRuntime.jsxs("div", { style: { flex: 1, overflow: 'auto' }, children: [state.tab === 'files' && jsxRuntime.jsx(FilesPanel, {}), state.tab === 'autoloads' && jsxRuntime.jsx(AutoloadsPanel, {}), state.tab === 'plugins' && jsxRuntime.jsx(PluginsPanel, {}), state.tab === 'exports' && jsxRuntime.jsx(ExportsPanel, {})] })] }) }));
|
|
666
|
-
});
|
|
667
|
-
GodotProjectBrowser.displayName = 'GodotProjectBrowser';
|
|
667
|
+
}), { displayName: 'GodotProjectBrowser' });
|
|
668
668
|
|
|
669
669
|
exports.GodotProjectBrowser = GodotProjectBrowser;
|
|
@@ -5,7 +5,7 @@ var React = require('react');
|
|
|
5
5
|
var I18n = require('./I18n.js');
|
|
6
6
|
|
|
7
7
|
/* ── Context ──────────────────────────────────────────────────── */
|
|
8
|
-
const I18nContext = React.createContext(null);
|
|
8
|
+
const I18nContext = /* @__PURE__ */ React.createContext(null);
|
|
9
9
|
/**
|
|
10
10
|
* Provider component to supply a custom I18nManager to the tree.
|
|
11
11
|
* If not used, the global singleton (getI18n()) is used automatically.
|
|
@@ -195,8 +195,8 @@ class GodotSceneImporter extends SceneImporter.SceneImporter {
|
|
|
195
195
|
// Handle multiline values
|
|
196
196
|
if (multilineKey) {
|
|
197
197
|
multilineValue += '\n' + line;
|
|
198
|
-
bracketDepth += (line.match(/[
|
|
199
|
-
bracketDepth -= (line.match(/[\]
|
|
198
|
+
bracketDepth += (line.match(/[[{]/g) || []).length;
|
|
199
|
+
bracketDepth -= (line.match(/[\]}]/g) || []).length;
|
|
200
200
|
if (bracketDepth === 0) {
|
|
201
201
|
currentItem[multilineKey] = this.parseGodotValue(multilineValue);
|
|
202
202
|
multilineKey = '';
|
|
@@ -210,8 +210,8 @@ class GodotSceneImporter extends SceneImporter.SceneImporter {
|
|
|
210
210
|
const key = propMatch[1];
|
|
211
211
|
const value = propMatch[2];
|
|
212
212
|
// Check if value starts multiline
|
|
213
|
-
bracketDepth = (value.match(/[
|
|
214
|
-
bracketDepth -= (value.match(/[\]
|
|
213
|
+
bracketDepth = (value.match(/[[{]/g) || []).length;
|
|
214
|
+
bracketDepth -= (value.match(/[\]}]/g) || []).length;
|
|
215
215
|
if (bracketDepth > 0) {
|
|
216
216
|
multilineKey = key;
|
|
217
217
|
multilineValue = value;
|
|
@@ -152,7 +152,7 @@ class LDtkImporter extends SceneImporter.SceneImporter {
|
|
|
152
152
|
const externalLevel = JSON.parse(content);
|
|
153
153
|
level.layerInstances = externalLevel.layerInstances;
|
|
154
154
|
}
|
|
155
|
-
catch
|
|
155
|
+
catch {
|
|
156
156
|
this.addWarning('LEVEL_LOAD_ERROR', `Failed to load external level: ${level.externalRelPath}`, level.externalRelPath);
|
|
157
157
|
}
|
|
158
158
|
}
|
|
@@ -68,7 +68,7 @@ class OgmoImporter extends SceneImporter.SceneImporter {
|
|
|
68
68
|
const scene = this.convertLevelToScene(levelData, levelPath);
|
|
69
69
|
scenes.push(scene);
|
|
70
70
|
}
|
|
71
|
-
catch
|
|
71
|
+
catch {
|
|
72
72
|
this.addWarning('LEVEL_LOAD', `Failed to load level: ${levelPath}`, levelPath);
|
|
73
73
|
}
|
|
74
74
|
}
|
|
@@ -567,7 +567,7 @@ class TiledMapImporter extends SceneImporter.SceneImporter {
|
|
|
567
567
|
// Merge external tileset data
|
|
568
568
|
Object.assign(tileset, externalTileset, { firstGid: tileset.firstGid });
|
|
569
569
|
}
|
|
570
|
-
catch
|
|
570
|
+
catch {
|
|
571
571
|
this.addWarning('TILESET_LOAD_ERROR', `Failed to load external tileset: ${tileset.source}`, tileset.source);
|
|
572
572
|
}
|
|
573
573
|
}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
var jsxRuntime = require('react/jsx-runtime');
|
|
4
4
|
var React = require('react');
|
|
5
5
|
|
|
6
|
-
const Ctx = React.createContext(undefined);
|
|
6
|
+
const Ctx = /* @__PURE__ */ React.createContext(undefined);
|
|
7
7
|
/* ── Provider ──────────────────────────────────────────────────── */
|
|
8
8
|
function GamepadNavigationProvider({ children }) {
|
|
9
9
|
const [focusables, setFocusables] = React.useState([]);
|
|
@@ -985,7 +985,7 @@ class InventoryManager {
|
|
|
985
985
|
/* ═══════════════════════════════════════════════════════════════
|
|
986
986
|
REACT INTEGRATION
|
|
987
987
|
══════════════════════════════════════════════════════════════════ */
|
|
988
|
-
const InventoryContext = React.createContext(null);
|
|
988
|
+
const InventoryContext = /* @__PURE__ */ React.createContext(null);
|
|
989
989
|
const InventoryProvider = ({ manager, children }) => {
|
|
990
990
|
return React.createElement(InventoryContext.Provider, { value: manager }, children);
|
|
991
991
|
};
|
|
@@ -634,37 +634,48 @@ class PostProcessStack {
|
|
|
634
634
|
this.passes = [];
|
|
635
635
|
}
|
|
636
636
|
}
|
|
637
|
-
const QUALITY_PRESET_CONFIGS = {
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
medium: {
|
|
646
|
-
sampleCount: 1,
|
|
647
|
-
shadows: { ...DEFAULT_RENDER_CONFIG.shadows, mapSize: 1024, cascadeCount: 2 },
|
|
648
|
-
postProcess: { ...DEFAULT_RENDER_CONFIG.postProcess, effects: [FXAA_DEFAULTS] },
|
|
649
|
-
depthPrepassEnabled: false,
|
|
650
|
-
},
|
|
651
|
-
high: {
|
|
652
|
-
sampleCount: 4,
|
|
653
|
-
shadows: { ...DEFAULT_RENDER_CONFIG.shadows, mapSize: 2048, cascadeCount: 4 },
|
|
654
|
-
postProcess: { ...DEFAULT_RENDER_CONFIG.postProcess, effects: [FXAA_DEFAULTS, BLOOM_DEFAULTS] },
|
|
655
|
-
depthPrepassEnabled: true,
|
|
656
|
-
},
|
|
657
|
-
ultra: {
|
|
658
|
-
sampleCount: 4,
|
|
659
|
-
shadows: { ...DEFAULT_RENDER_CONFIG.shadows, mapSize: 4096, cascadeCount: 4, pcfRadius: 3 },
|
|
660
|
-
postProcess: {
|
|
661
|
-
...DEFAULT_RENDER_CONFIG.postProcess,
|
|
662
|
-
effects: [FXAA_DEFAULTS, BLOOM_DEFAULTS, SSAO_DEFAULTS, DOF_DEFAULTS, COLOR_GRADING_DEFAULTS],
|
|
637
|
+
const QUALITY_PRESET_CONFIGS = /* @__PURE__ */ (function () {
|
|
638
|
+
return {
|
|
639
|
+
low: {
|
|
640
|
+
sampleCount: 1,
|
|
641
|
+
shadows: { ...DEFAULT_RENDER_CONFIG.shadows, enabled: false },
|
|
642
|
+
postProcess: { ...DEFAULT_RENDER_CONFIG.postProcess, hdrEnabled: false, effects: [] },
|
|
643
|
+
depthPrepassEnabled: false,
|
|
644
|
+
occlusionCulling: false,
|
|
663
645
|
},
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
}
|
|
646
|
+
medium: {
|
|
647
|
+
sampleCount: 1,
|
|
648
|
+
shadows: { ...DEFAULT_RENDER_CONFIG.shadows, mapSize: 1024, cascadeCount: 2 },
|
|
649
|
+
postProcess: { ...DEFAULT_RENDER_CONFIG.postProcess, effects: [FXAA_DEFAULTS] },
|
|
650
|
+
depthPrepassEnabled: false,
|
|
651
|
+
},
|
|
652
|
+
high: {
|
|
653
|
+
sampleCount: 4,
|
|
654
|
+
shadows: { ...DEFAULT_RENDER_CONFIG.shadows, mapSize: 2048, cascadeCount: 4 },
|
|
655
|
+
postProcess: {
|
|
656
|
+
...DEFAULT_RENDER_CONFIG.postProcess,
|
|
657
|
+
effects: [FXAA_DEFAULTS, BLOOM_DEFAULTS],
|
|
658
|
+
},
|
|
659
|
+
depthPrepassEnabled: true,
|
|
660
|
+
},
|
|
661
|
+
ultra: {
|
|
662
|
+
sampleCount: 4,
|
|
663
|
+
shadows: { ...DEFAULT_RENDER_CONFIG.shadows, mapSize: 4096, cascadeCount: 4, pcfRadius: 3 },
|
|
664
|
+
postProcess: {
|
|
665
|
+
...DEFAULT_RENDER_CONFIG.postProcess,
|
|
666
|
+
effects: [
|
|
667
|
+
FXAA_DEFAULTS,
|
|
668
|
+
BLOOM_DEFAULTS,
|
|
669
|
+
SSAO_DEFAULTS,
|
|
670
|
+
DOF_DEFAULTS,
|
|
671
|
+
COLOR_GRADING_DEFAULTS,
|
|
672
|
+
],
|
|
673
|
+
},
|
|
674
|
+
depthPrepassEnabled: true,
|
|
675
|
+
occlusionCulling: true,
|
|
676
|
+
},
|
|
677
|
+
};
|
|
678
|
+
})();
|
|
668
679
|
function applyQualityPreset(preset) {
|
|
669
680
|
return { ...DEFAULT_RENDER_CONFIG, ...QUALITY_PRESET_CONFIGS[preset] };
|
|
670
681
|
}
|
|
@@ -300,7 +300,7 @@ class UnityProjectImporter {
|
|
|
300
300
|
const parts = path.replace(/\\/g, '/').split('/');
|
|
301
301
|
return parts[parts.length - 1] || 'UnknownProject';
|
|
302
302
|
}
|
|
303
|
-
async detectUnityVersion(
|
|
303
|
+
async detectUnityVersion(_projectPath) {
|
|
304
304
|
// Read ProjectSettings/ProjectVersion.txt
|
|
305
305
|
// In real implementation, read from file system
|
|
306
306
|
// Format: m_EditorVersion: 2022.3.10f1
|
|
@@ -596,7 +596,7 @@ class UnityProjectImporter {
|
|
|
596
596
|
field.tooltip = tooltipMatch[1];
|
|
597
597
|
}
|
|
598
598
|
// Range
|
|
599
|
-
const rangeMatch = attrBlock.match(/\[Range\(([^,]+),\s*([
|
|
599
|
+
const rangeMatch = attrBlock.match(/\[Range\(([^,]+),\s*([^)]+)\)\]/);
|
|
600
600
|
if (rangeMatch) {
|
|
601
601
|
field.range = {
|
|
602
602
|
min: parseFloat(rangeMatch[1]),
|
|
@@ -80,7 +80,7 @@ const INITIAL_STATE = {
|
|
|
80
80
|
view: 'grid',
|
|
81
81
|
myAssets: false,
|
|
82
82
|
};
|
|
83
|
-
const StoreContext = React.createContext(null);
|
|
83
|
+
const StoreContext = /* @__PURE__ */ React.createContext(null);
|
|
84
84
|
function useStore() {
|
|
85
85
|
const ctx = React.useContext(StoreContext);
|
|
86
86
|
if (!ctx) {
|
|
@@ -697,7 +697,8 @@ const DEMO_ASSETS = [
|
|
|
697
697
|
url: 'https://assetstore.unity.com/',
|
|
698
698
|
},
|
|
699
699
|
];
|
|
700
|
-
const UnityAssetStoreBrowser =
|
|
700
|
+
const UnityAssetStoreBrowser = /* @__PURE__ */ Object.assign(
|
|
701
|
+
/* @__PURE__ */ React.forwardRef(({ theme: themeOverride, onDownload, onPurchase: _onPurchase, className, style }, ref) => {
|
|
701
702
|
const [state, dispatch] = React.useReducer(storeReducer, {
|
|
702
703
|
...INITIAL_STATE,
|
|
703
704
|
results: DEMO_ASSETS,
|
|
@@ -793,7 +794,6 @@ const UnityAssetStoreBrowser = React.forwardRef(({ theme: themeOverride, onDownl
|
|
|
793
794
|
overflow: 'hidden',
|
|
794
795
|
...style,
|
|
795
796
|
}, children: [jsxRuntime.jsx(SearchHeader, {}), jsxRuntime.jsx("div", { style: { flex: 1, overflow: 'auto' }, children: jsxRuntime.jsx(AssetGrid, {}) }), jsxRuntime.jsx(AssetDetailModal, {})] }) }));
|
|
796
|
-
});
|
|
797
|
-
UnityAssetStoreBrowser.displayName = 'UnityAssetStoreBrowser';
|
|
797
|
+
}), { displayName: 'UnityAssetStoreBrowser' });
|
|
798
798
|
|
|
799
799
|
exports.UnityAssetStoreBrowser = UnityAssetStoreBrowser;
|
|
@@ -93,7 +93,7 @@ const INITIAL_STATE = {
|
|
|
93
93
|
liveLinkStatus: { connected: false, playMode: 'stopped' },
|
|
94
94
|
tab: 'assets',
|
|
95
95
|
};
|
|
96
|
-
const BrowserContext = React.createContext(null);
|
|
96
|
+
const BrowserContext = /* @__PURE__ */ React.createContext(null);
|
|
97
97
|
function useBrowser() {
|
|
98
98
|
const ctx = React.useContext(BrowserContext);
|
|
99
99
|
if (!ctx) {
|
|
@@ -703,7 +703,8 @@ const DEMO_PROJECT = {
|
|
|
703
703
|
{ path: 'Assets/Scenes/Level2.unity', enabled: true },
|
|
704
704
|
],
|
|
705
705
|
};
|
|
706
|
-
const UnityProjectBrowser =
|
|
706
|
+
const UnityProjectBrowser = /* @__PURE__ */ Object.assign(
|
|
707
|
+
/* @__PURE__ */ React.forwardRef(({ projectPath, theme: themeOverride, onProjectLoad, onImport, onLiveLinkConnect, onLiveLinkDisconnect, className, style, }, ref) => {
|
|
707
708
|
const [state, dispatch] = React.useReducer(browserReducer, {
|
|
708
709
|
...INITIAL_STATE,
|
|
709
710
|
projectInfo: DEMO_PROJECT,
|
|
@@ -791,7 +792,10 @@ const UnityProjectBrowser = React.forwardRef(({ projectPath, theme: themeOverrid
|
|
|
791
792
|
}, [onLiveLinkConnect]);
|
|
792
793
|
const disconnectLiveLink = React.useCallback(() => {
|
|
793
794
|
onLiveLinkDisconnect?.();
|
|
794
|
-
dispatch({
|
|
795
|
+
dispatch({
|
|
796
|
+
type: 'SET_LIVE_LINK_STATUS',
|
|
797
|
+
status: { connected: false, playMode: 'stopped' },
|
|
798
|
+
});
|
|
795
799
|
}, [onLiveLinkDisconnect]);
|
|
796
800
|
// Imperative handle
|
|
797
801
|
React.useImperativeHandle(ref, () => ({
|
|
@@ -828,7 +832,6 @@ const UnityProjectBrowser = React.forwardRef(({ projectPath, theme: themeOverrid
|
|
|
828
832
|
...style,
|
|
829
833
|
}, children: [jsxRuntime.jsx(BrowserHeader, { projectPath: projectPath }), jsxRuntime.jsx(BrowserToolbar, {}), jsxRuntime.jsx(TabBar, {}), jsxRuntime.jsxs("div", { style: { flex: 1, overflow: 'auto' }, children: [state.tab === 'assets' &&
|
|
830
834
|
(state.viewMode === 'tree' && state.projectInfo ? (jsxRuntime.jsx("div", { style: { padding: 8 }, children: jsxRuntime.jsx(FolderTreeItem, { folder: state.projectInfo.folders, indent: 0 }) })) : (jsxRuntime.jsx(AssetGridView, {}))), state.tab === 'scenes' && jsxRuntime.jsx(ScenesPanel, {}), state.tab === 'packages' && jsxRuntime.jsx(PackagesPanel, {}), state.tab === 'settings' && jsxRuntime.jsx(SettingsPanel, {})] }), jsxRuntime.jsx(PreviewPanel, {}), jsxRuntime.jsx(ImportProgressOverlay, {})] }) }));
|
|
831
|
-
});
|
|
832
|
-
UnityProjectBrowser.displayName = 'UnityProjectBrowser';
|
|
835
|
+
}), { displayName: 'UnityProjectBrowser' });
|
|
833
836
|
|
|
834
837
|
exports.UnityProjectBrowser = UnityProjectBrowser;
|
|
@@ -101,7 +101,7 @@ const INITIAL_STATE = {
|
|
|
101
101
|
tab: 'content',
|
|
102
102
|
tileSize: 'medium',
|
|
103
103
|
};
|
|
104
|
-
const BrowserContext = React.createContext(null);
|
|
104
|
+
const BrowserContext = /* @__PURE__ */ React.createContext(null);
|
|
105
105
|
function useBrowser() {
|
|
106
106
|
const ctx = React.useContext(BrowserContext);
|
|
107
107
|
if (!ctx) {
|
|
@@ -698,7 +698,8 @@ const DEMO_PROJECT = {
|
|
|
698
698
|
defaultPawn: '/Game/Blueprints/BP_Player',
|
|
699
699
|
},
|
|
700
700
|
};
|
|
701
|
-
const UnrealProjectBrowser =
|
|
701
|
+
const UnrealProjectBrowser = /* @__PURE__ */ Object.assign(
|
|
702
|
+
/* @__PURE__ */ React.forwardRef(({ projectPath: _projectPath, theme: themeOverride, onProjectLoad, onImport, onLiveLinkConnect, onLiveLinkDisconnect, onHotReload, className, style, }, ref) => {
|
|
702
703
|
const [state, dispatch] = React.useReducer(browserReducer, {
|
|
703
704
|
...INITIAL_STATE,
|
|
704
705
|
projectInfo: DEMO_PROJECT,
|
|
@@ -783,7 +784,7 @@ const UnrealProjectBrowser = React.forwardRef(({ projectPath: _projectPath, them
|
|
|
783
784
|
},
|
|
784
785
|
});
|
|
785
786
|
}
|
|
786
|
-
catch
|
|
787
|
+
catch {
|
|
787
788
|
dispatch({
|
|
788
789
|
type: 'SET_LIVE_LINK_STATUS',
|
|
789
790
|
status: { ...state.liveLinkStatus, compiling: false },
|
|
@@ -830,7 +831,6 @@ const UnrealProjectBrowser = React.forwardRef(({ projectPath: _projectPath, them
|
|
|
830
831
|
overflow: 'hidden',
|
|
831
832
|
...style,
|
|
832
833
|
}, children: [jsxRuntime.jsx(BrowserHeader, {}), jsxRuntime.jsx(BrowserToolbar, {}), jsxRuntime.jsx(TabBar, {}), jsxRuntime.jsxs("div", { style: { flex: 1, overflow: 'auto' }, children: [state.tab === 'content' && jsxRuntime.jsx(ContentPanel, {}), state.tab === 'levels' && jsxRuntime.jsx(LevelsPanel, {}), state.tab === 'plugins' && jsxRuntime.jsx(PluginsPanel, {}), state.tab === 'modules' && jsxRuntime.jsx(ModulesPanel, {}), state.tab === 'settings' && jsxRuntime.jsx(SettingsPanel, {})] })] }) }));
|
|
833
|
-
});
|
|
834
|
-
UnrealProjectBrowser.displayName = 'UnrealProjectBrowser';
|
|
834
|
+
}), { displayName: 'UnrealProjectBrowser' });
|
|
835
835
|
|
|
836
836
|
exports.UnrealProjectBrowser = UnrealProjectBrowser;
|
|
@@ -126,7 +126,7 @@ class BTNode {
|
|
|
126
126
|
this.name = name;
|
|
127
127
|
}
|
|
128
128
|
/** Initialize the node */
|
|
129
|
-
initialize(
|
|
129
|
+
initialize(_context) { }
|
|
130
130
|
/** Reset the node state */
|
|
131
131
|
reset() {
|
|
132
132
|
this.lastStatus = 'inactive';
|
|
@@ -264,7 +264,7 @@ class BTParallel extends BTComposite {
|
|
|
264
264
|
this.failurePolicy = 'one';
|
|
265
265
|
this.childStatuses = [];
|
|
266
266
|
}
|
|
267
|
-
initialize(
|
|
267
|
+
initialize(_context) {
|
|
268
268
|
this.childStatuses = new Array(this.children.length).fill('running');
|
|
269
269
|
}
|
|
270
270
|
tick(context) {
|
|
@@ -348,7 +348,7 @@ class BTRandomSelector extends BTComposite {
|
|
|
348
348
|
super('randomSelector', name);
|
|
349
349
|
this.shuffledOrder = [];
|
|
350
350
|
}
|
|
351
|
-
initialize(
|
|
351
|
+
initialize(_context) {
|
|
352
352
|
this.shuffle();
|
|
353
353
|
}
|
|
354
354
|
shuffle() {
|
|
@@ -398,7 +398,7 @@ class BTRandomSequence extends BTComposite {
|
|
|
398
398
|
super('randomSequence', name);
|
|
399
399
|
this.shuffledOrder = [];
|
|
400
400
|
}
|
|
401
|
-
initialize(
|
|
401
|
+
initialize(_context) {
|
|
402
402
|
this.shuffle();
|
|
403
403
|
}
|
|
404
404
|
shuffle() {
|
|
@@ -452,6 +452,8 @@ const GameAudioSettings = ({ bridge, className, style, }) => {
|
|
|
452
452
|
},
|
|
453
453
|
}, `${Math.round((volumes[bus] ?? 1) * 100)}%`))));
|
|
454
454
|
};
|
|
455
|
-
|
|
455
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
456
|
+
GameAudioSettings.displayName = 'GameAudioSettings';
|
|
457
|
+
}
|
|
456
458
|
|
|
457
459
|
export { AudioBusMixer, DEFAULT_SPATIAL, GameAudioBridge, GameAudioSettings, MusicManager, SFXPool, useGameAudio };
|
|
@@ -272,7 +272,7 @@ window/size/viewport_height=1080
|
|
|
272
272
|
renderer/rendering_method="${config.scriptLanguage === 'csharp' ? 'forward_plus' : 'mobile'}"
|
|
273
273
|
`;
|
|
274
274
|
}
|
|
275
|
-
generateExportPresets(
|
|
275
|
+
generateExportPresets(_config) {
|
|
276
276
|
return `[preset.0]
|
|
277
277
|
|
|
278
278
|
name="Linux/X11"
|
|
@@ -331,7 +331,7 @@ class UnrealBuildCloud {
|
|
|
331
331
|
],
|
|
332
332
|
}, null, 2);
|
|
333
333
|
}
|
|
334
|
-
generateDefaultGameIni(
|
|
334
|
+
generateDefaultGameIni(_config) {
|
|
335
335
|
return `[/Script/EngineSettings.GeneralProjectSettings]
|
|
336
336
|
ProjectID=${this.generateGuid()}
|
|
337
337
|
ProjectName=Nice2Dev Project
|
|
@@ -19,15 +19,17 @@ const DEFAULT_RENDERING = {
|
|
|
19
19
|
antiAlias: true,
|
|
20
20
|
backgroundColor: WHITE,
|
|
21
21
|
};
|
|
22
|
-
const DEFAULT_SETTINGS = {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
}
|
|
22
|
+
const DEFAULT_SETTINGS = /* @__PURE__ */ (function () {
|
|
23
|
+
return {
|
|
24
|
+
width: 1280,
|
|
25
|
+
height: 720,
|
|
26
|
+
targetFps: 60,
|
|
27
|
+
maxPlayers: 4,
|
|
28
|
+
physics: { ...DEFAULT_PHYSICS },
|
|
29
|
+
audio: { ...DEFAULT_AUDIO },
|
|
30
|
+
rendering: { ...DEFAULT_RENDERING },
|
|
31
|
+
};
|
|
32
|
+
})();
|
|
31
33
|
class GameConfig {
|
|
32
34
|
constructor(overrides) {
|
|
33
35
|
this._settings = mergeSettings(DEFAULT_SETTINGS, overrides ?? {});
|
|
@@ -661,6 +661,8 @@ const AnalyticsDashboard = ({ analytics, className, style, }) => {
|
|
|
661
661
|
style: { padding: 16, fontFamily: 'monospace', fontSize: 13, ...style },
|
|
662
662
|
}, React.createElement('h3', { style: { margin: '0 0 12px 0' } }, 'Gameplay Analytics'), React.createElement('div', { style: statStyle }, React.createElement('span', null, 'Session ID'), React.createElement('code', null, summary.sessionId)), React.createElement('div', { style: statStyle }, React.createElement('span', null, 'Total Events'), React.createElement('span', null, String(summary.totalEvents))), React.createElement('div', { style: statStyle }, React.createElement('span', null, 'Heatmaps'), React.createElement('span', null, String(summary.heatmapCount))), React.createElement('div', { style: statStyle }, React.createElement('span', null, 'Recording'), React.createElement('span', null, summary.isRecording ? `ON (${summary.recordedFrames} frames)` : 'OFF')));
|
|
663
663
|
};
|
|
664
|
-
|
|
664
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
665
|
+
AnalyticsDashboard.displayName = 'AnalyticsDashboard';
|
|
666
|
+
}
|
|
665
667
|
|
|
666
668
|
export { AnalyticsDashboard, DEFAULT_HEATMAP_CONFIG, DEFAULT_RECORDING_CONFIG, DEFAULT_TELEMETRY_CONFIG, FunnelTracker, GameplayAnalytics, HeatmapGenerator, SessionPlayer, SessionRecorder, TelemetryPipeline, useGameplayAnalytics };
|