Note: This project is a sample demonstration of the interaction between Unity WebGL and web technologies (JavaScript). The demo showcases how to pass data between a web page and a Unity WebGL canvas in both directions.
This feature allows you to assign a new position to a cube in the Unity WebGL canvas by entering coordinates in the web form and clicking a button.
How It Works:
- Enter values for the
x
,y
, andz
coordinates in the input fields. - Click the "Set Cube Position" button to move the brown cube to the specified position.
This demonstrates how to pass information from the web (JavaScript) to the Unity WebGL canvas.
This feature allows interaction from the Unity WebGL canvas to the web page. By clicking on any cube within the Unity canvas, a message will be displayed on the web page.
How It Works:
- Click on any cube in the Unity WebGL canvas.
- A message related to the selected cube will appear on the web page, showing how data can be passed from Unity WebGL to JavaScript.
This feature enables keyboard control of the brown cube within the Unity WebGL canvas.
How It Works:
- Use the
W
,A
,S
, andD
keys to move the brown cube within the Unity WebGL canvas.
To explore the interaction between Unity WebGL and JavaScript, follow the instructions below:
- Clone the repository:
git clone https://github.com/MuhammadFaizanKhan/UnityWebGLAndWebInteraction.git
Unity, WebGL, JavaScript, Unity WebGL, Unity WebGL interaction, Unity JavaScript, Unity Web interaction, Unity WebGL demo, Unity WebGL tutorial, Unity WebGL project, Unity WebGL data exchange