Introduction to using C# for making Augmented Reality & Virtual Reality scenes interactive in Unity 2018 and beyond.
The lecture slides first cover the basics of C# and clarify the different C# / .NET settings in Unity. Next, an in-depth look at how GameObjects work behind the scenes from the C# perspective. To complete the necessary basics, Coroutines provide means to handle autonomous code for a better software architecture - but these shouldn't be confused with true asynchronous threads.
The next part is specially geared towards AR / VR: how to implement gaze from the main headset camera. Raycasting provides the necessary search capabilities for the hit target.
How to inform the hit object? The described approach utilizes C# Events. These are a complex topic; therefore, the materials take a deeper look at what's behind Events: Delegates, EventHandler, Actions and UnityEvents.
To wrap up, the examples are completed using a reticle / cursor for raycasts. To put this into context with AR / VR, the examples are based on a canvas to place a 2D sprite in a 3D world space canvas.
- Scripting: Frameworks, APIs and Languages
- GameObjects: Behind the Scenes
- Gaze & Raycasting
- Delegates, Events & Actions
- Reticle / Cursor for Raycasts, based on a Canvas