Using Real Assets for Placeables | AR Unity Developer
Many interactables have been placed on the AR placeables in this AR app, with the latest one involving AR Annotations. So far, all of the work has been done on simple shapes, like cubes, spheres, and cylinders. Now it’s time to apply these interactables using real assets.
First, import the type of assets that you will be using for the app. I’ve imported a set of office tools to use in the AR app from Filebase. These assets will include objects like pencils, calculators, markers, and more. Before moving on with these assets, the materials need to be converted to URP. Select the materials that appear purple, then navigate to Edit -> Rendering -> Materials -> Convert Selected Built-in Materials to URP.
Next step is replacing the shapes of the placement prefab with the realistic assets. You can create it from scratch, but it’s faster to take a placement prefab that has already been made and make some changes to that instead.
Begin by duplicating a placement prefab into the scene and renaming it. Select the new placement prefab and bring in the 3D asset of your choice. For my example, I brought in a pencil, which is much smaller compared to the cube I originally created. Pair the visualizations for the annotation and selection and pair it to the pencil. Delete the cube once that is done. With the change of shapes and objects, the visualizations will need to be modified, including text and placement of the annotation and the size of the selection visualization.
The final steps of this new prefab involves the colliders. First, the pencil needs to have a collider added to it. Next, the deletion of the cube means this realistic placement prefab has no collider references in the AR interactable components. Drag the new collider of the pencil into the collider fields of the AR interactable components of the placement prefab.
Test out the new realistic prefab by swapping the new placement prefab in the AR Placement Interactable. Depending on the size of the asset in AR, you may need to make additional changes.