Vuenity
A Vue.js wrapper component for Unity WebGL player based on react-unity-webgl, with in and out communications.
Supports typescript;
Installation
npm install --save vuenity
Usage
{{ message }}
Build
folder should be in your public
folder.
In your Unity project, under Assets/Plugins/WebGL/
(or anywhere else in assets) create a VuePlugin.jslib
with:
;
And finally, in one of your C#
scripts:
using UnityEngine;using System.Runtime.InteropServices; public class GameController : MonoBehaviour { [DllImport("__Internal")] private static extern void NiceWords(string message); public void NiceWords (string message) { NiceWords(message); }}