My Unity Diary (5)

Sine
Jul 19, 2021

Week 5

I am a learner and there can be a misunderstanding. If you spot any place of improvement, please kindly comment.

  1. Create a joystick controller
  • Creating UI Camera separately so that (1) we can have the separate camera work for UI and (2) we can place UI’s above the scenes
  • We can place numerous Camera and layer them — each Camera’s culling mask needs to be adjusted.
Main Camera’s Culling Mask set for everything
Once we create a Camera for the only UI, we separate UI from the Main Camera
Culling Mask for UI Camera

2. IDragHandler, IBeginDragHandler, IEndDragHandler

When the above appears with MonoBehaviour, these interface force to add certain types of functions. Once the functions created, the function can be called in the specific event.

For example, IDragHandler matches with OnDrag function. IEndDragHandler matches with OnEndDrag function. IBeginDragHandler matches with OnBeginDrag function.

--

--