Sitemap

How to make Examinable Object in AR with Unity3d.

3 min readApr 22, 2025

Objective: Making Examinable Object in AR with Unity3d.

Before doing anything I will create new scene and prepare all component for being able to place object on AR environment.

Note: We did this before so i will post image I wont repeat my self over and over. Some one said please repeat! okay, I will write some Information below image just for you guys

Add this component to XR Origin(AR)
In a main camera we need to add this
Add this component XR Interaction manager will be added automation if you add AR Placement Interactable or XR Origin I forgot which one its your task.

I have create a cube and called it examinable cube add this to placement prefab in the inspector on AR Placement Interactable.

If you find hard to understand read this article to follow step by step https://medium.com/@suleimanabdullah/working-with-ar-interactable-5fb1ad03766e

Making Examinable Object

Create two script Examinable and ExaminableManager ,attach examinable to examanible prefab and add ExamibleManager to Examinable Manager object you to have to create it in the hierarchy

Create these types of variable on ExaminableManager scripts.

Create two public method called PerformExaminable and PerformUnExaminable which will be responsible for update the position and rotation and parent the examinable object to the container.

Note: For the sake of this article am not going to explain anymore I believe you have been following me for long time so assume you are not a beginner anymore.

Go to Examinable script.

Create Examinable Manager variable and cached it to the start method.

Create another two public method called RequestUxamine and RequestUnExamine. Then call PerfomExamine and PerformUnExamine respectively.

Create empty game Object inside main camera called Examinable_Container ,then select Examinable Manager < Inspector < ExaminableContainer.Drag and drop Examinable_Container to ExaminableContainer field in the Inspector.

Now open Examinable Cube prefab add AR Selection Interactable and add two Interaction event, drag and drop Examinable component to select and Select Exited then choose method to execute respectively due to event.

Build your app and try this feature on your device, see you into the next one.

--

--

Suleiman Abdullah
Suleiman Abdullah

Written by Suleiman Abdullah

Self taught Unity Developer, who is passion about making games ,and he loves Math For Game Development

Responses (1)