To create a point-and-click game by setting GameObjects to a selected tile, do the following:
- Delete your 3D Cube, Sphere, and Cylinder GameObjects from the scene.
- Create a new 3D Plane object scaled to (0.1, 0.1, 0.1).
- Create a new Material object with the Texture image provided; that is, square_outline.png (a black square with a red outline). Apply this Material object to your 3D Plane.
- Add an instance object of the ClickMeToSetDestination script class as a component to your 3D Plane.
- In the Project window, create a new, empty Prefab named tile.
- Populate your tile prefab with the properties of your 3D Plane GameObject by dragging the Plane GameObject over your tile prefab (it should change from white to blue to indicate that the prefab now has the properties of your GameObject).
- Delete your 3D Plane GameObject from the scene.
- Create a new TileManager C# script class containing the following ...