Line 20: | Line 20: | ||
Right click Radio Demo object and create a canvas and set the canvas render mode to screen space overlay, this will create a canvas in which we can add UI elements over the main screen. | Right click Radio Demo object and create a canvas and set the canvas render mode to screen space overlay, this will create a canvas in which we can add UI elements over the main screen. | ||
+ | |||
+ | [[File:Radio Demo 3.jpeg]] | ||
+ | |||
+ | Set the UI scale mode to scale with screen size, this will scale the UI and elements dependant on the users screen resolution. |
In this tutorial we are going to create a radio script that allows us to play and change the streamed radio being played within a region in Sinespace. You will require a current install of Unity and our SpacePack API for this demo to work correctly Get Started.
Firstly right click in the hierarchy and create an empty game object and set the transform to 0 0 0 and rename it to Radio Demo, this will be our container for the virtual goods component and room furniture component (more on this later), it also helps us keep our project tidy. Right click on the Radio Demo game object and create a cube and renamed it as Stream Player, this will be our radio model (you can add any model you like here).
While the Stream Player is selected add the following components to the game object by clicking the add component button at the bottom of the inspector :
Right click Radio Demo object and create a canvas and set the canvas render mode to screen space overlay, this will create a canvas in which we can add UI elements over the main screen.
Set the UI scale mode to scale with screen size, this will scale the UI and elements dependant on the users screen resolution.