This is a boilerplate Unity WebGL ++ VueJS web app with **VueX && vue-router pre-installed.
This project takes advantage of the Unity3d web container wrapper component provided by @votetake's vue-unity-webgl Node package.
Install deps:
npm install
Spin up Node dev server:
npm run serve
./public/Build
&& ./public/TemplateData
- the templates/JS functions of a bare Unity3D WebGL project.
The Unity scene contains only a lean 3D plane and a text object.
Text can be sent to the text object in the Unity game instance via the @click
method in ./src/views/Home.vue
:
// $refs.myInstance === <unity ref="myInstance">
this.$refs.myInstance.message('Text', 'SetText', this.textInput)
Note: Further configuration is needed to make the text input in ./src/views/Home.vue
editable after the Unity game loads,
since the Unity WebGL instance grabs all keyboard input to the page. There is an example string in the input box for this reason.
[WIP]
npm install
npm run serve
npm run build
npm run test
npm run lint