Skip to content

Instantly share code, notes, and snippets.

@aallbrig
Created February 20, 2022 03:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aallbrig/2c243ce8b3d39bff2a0674744585d2e2 to your computer and use it in GitHub Desktop.
Save aallbrig/2c243ce8b3d39bff2a0674744585d2e2 to your computer and use it in GitHub Desktop.
var canvas = document.querySelector("#unity-canvas");
var config = {
dataUrl: "Build/{{{ DATA_FILENAME }}}",
frameworkUrl: "Build/{{{ FRAMEWORK_FILENAME }}}",
codeUrl: "Build/{{{ CODE_FILENAME }}}",
#if MEMORY_FILENAME
memoryUrl: "Build/{{{ MEMORY_FILENAME }}}",
#endif
#if SYMBOLS_FILENAME
symbolsUrl: "Build/{{{ SYMBOLS_FILENAME }}}",
#endif
streamingAssetsUrl: "StreamingAssets",
companyName: "{{{ COMPANY_NAME }}}",
productName: "{{{ PRODUCT_NAME }}}",
productVersion: "{{{ PRODUCT_VERSION }}}",
devicePixelRatio: 1,
}
createUnityInstance(canvas, config);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment