Game Development Reference
In-Depth Information
Along with the Shadow effect , Unity is also shipping two other Effect components
out of the box, these include:
Outline : An extension of the Shadow script, which provides a customizable
outline for the text instead of just an offset shadow.
Position As UV1 : Provides UV1 data for shaders about the Text . A bit more
of an advanced case that was requested quite strongly in the beta. This also
serves as a great example for how to build other effects that use the vertex
data of UI elements.
As stated, if that's not enough for you, then flex your coding skills and make some
more effects of your own, to share (you should always share if you can), or even sell
them if they are fancy enough. I'd expect a fair few of these to turn up after release.
Bring on the images
Next up is the Image control/component, which is the basis for all textured drawing
in the new UI framework (even if you just want a colored box).
The Image control is also very important for any input where you want the
player to interact with any UI GameObject as it forms the Hittable/Interactable
area for the Raycasting system. This determines what point of the screen a user is
touching/clicking and then uses the Image and its bounds (through the Graphics
Raycaster ) 3to determine which control the user may be interacting with.
Don't forget, there are also other Raycaster systems such as the Physics
and Physics2D raycasters if you want to test against 3D data, or you can
build your own based on them.
When we add the Image control to our scene, we get the default view in the inspector
as follows:
 
Search WWH ::




Custom Search