Complete room UI and protocol integration, move game definitions and resources behind bundle entries, publish authoritative version XML, and document single-game builds. Include all current resource changes and experiment artifacts.
22 lines
767 B
JavaScript
22 lines
767 B
JavaScript
'use strict';
|
|
|
|
const {createSnapshot, publishSnapshot} = require('./core');
|
|
let snapshot;
|
|
|
|
exports.throwError = true;
|
|
exports.onBeforeBuild = async function(options) {
|
|
snapshot = undefined;
|
|
const scenePath = await Editor.Message.request('asset-db', 'query-path', options.startScene);
|
|
snapshot = createSnapshot({projectPath: Editor.Project.path, scenePath, startScene: options.startScene});
|
|
};
|
|
exports.onAfterBuild = async function(options, result) {
|
|
try {
|
|
const destination = publishSnapshot(snapshot, options, result);
|
|
console.log(`[youle-version-manifest] ${snapshot.gameKey}: ${destination}`);
|
|
} finally {
|
|
snapshot = undefined;
|
|
}
|
|
};
|
|
exports.onError = function() {snapshot = undefined;};
|
|
exports.unload = function() {snapshot = undefined;};
|