Showing how to create script that triggers some functions when player is looking at object. This is useful when you want to create 3D buttons or just select and modify object when player is looking at it.
We will create class that has virtual "OnRaycastEnter", "OnRaycastLeave" and "OnRaycast" methods. This class can be derived so you can create multiple different implementations from it.