Recreating Islanders : Instantiate, Prefabs and Mouse Input in Unity : Part 3

This is a re-release of a video from my old channel, A Digital Mind. Part of a series of Unity tutorials. In this tutorial we work through the basics of how to use a Raycast to detect a position in the 3D World space with the mouse and then place an object in that location. Following this, all the code is refactored to make it ‘game’ ready. It does assume some basic Unity background but even beginners shouldn’t struggle too much.

This tutorial discusses Unity features such as:

  • Raycast Input
  • GetMouseButtonDown
  • Raycasthit
  • Normal
  • Renderer
  • SetActive
  • Bounds
  • ScreenPointToRay
  • Tranform.Position
  • LayerMask
  • GameObject
  • Instantiate
  • Prefab
  • Private / Public Methods and Variables

I hope that you find this exploration of Islanders mechanics helpful! Any questions, please leave in the comments below, on YouTube or via contacting me on Twitter and I’ll endeavor to assist!