Placing an object in the world
In our AR game, we'll spawn an object in the world whenever we tap the screen. This section will create the object to spawn a friendly (albeit spiky) turtle:
- Drag
TurtleShellPBR
from theAssets/RPG Monster Duo PBR Polyart/Prefabs
folder into the Hierarchy (or directly to the Scene panel) to add the Prefab to the current scene: - Position it at point
0, 0, 0
. - Scale the turtle to
0.1, 0.1, 0.1
so it doesn't take over your living room. - Rename it
Turtle
.
You'll quickly notice that it doesn't look quite right on account of it being completely pink. This shade of pink may be familiar to you if you've ever used a broken shader (or broken one yourself – I know I have!) or have forgotten to apply a material to a mesh. In this case, the issue is down to the material not being compliant with the URP. Luckily, we can fix this easily:
- In the...