Detailed Setup
This video is slightly older and may have some changes to current versions but has the basic setup
You can check out the "GameObject Tag Reference" page for details on all objects that will need tags or layers.
1). Setup some basic tags and layers before we start!
  • Make sure to create tags called:
    • "ExaminePoint" (Tag for the "ExaminePoint" gameobject parented to the "ExamineCamera")
    • "InspectPoint" (Tag for every single inspect point that exists for an object)
  • Create two layers:
    • β€œExamineLayer” (Doesn't need to be added to objects, referenced in code)
    • "InspectPointLayer" (Tag for every single inspect point)

Character Controller Collider Note

Make sure your character controller (If it has a collider) has the layer of "Ignore Raycast" - This will stop the raycast being interrupted when looking at objects which are lower than the camera up close.
2). When starting your new project please import the β€œCharacters” Standard assets or any FPSController you wish. NOTE: I have provided this for you, but you may use your own if you wish!

Using a different Character Controller?

If you do have any issues with getting another character controller working, take a look at my expanding page on the right hand toolbar or send me an email!
3). Add the β€œFPSController” from the β€œPrefabs” folder of my asset package to your scene. You can drag this into the hierarchy or the main scene.
4. The β€œFPSController” will have a main camera parented to it and another camera called the β€œExamineCamera” – This camera is a β€œDepth ONLY” camera (Which means it will only render things we specify and will lower the overhead on rendering your scene in a different camera view. NOTE: Make sure the ONLY culling mask on this camera is β€œExamineLayer”! (Also make sure Depth is set to 1!)

URP / HDRP Setup with Cameras

Please note, for URP / HDRP this is slightly different - You can see the setup for URP / HDRP on the left hand toolbar!
5. On your β€œMainCamera” make sure the β€œCulling Mask” has β€œExamineLayer” unticked!
6. Please navigate to the scripts folder and add the β€œExamineRaycast” script to your β€œMainCamera”. (If not already from the FPSController_Prefab I have provided)
7. Navigate to the β€œScripts” folder again and add the β€œBlurOptimized” script to your β€œMainCamera”. (If not already on the prefab I provided). Untick the script so it is not active.
This blur script is not available in URP / HDRP because Unity changed the way GrabPasses work in these versions, you COULD use the post processing stack to enable / disable 'Depth of Field' or use a canvas. I do have some example projects which may help you out! Do let me know via email, I'll gladly give you some advice!
8. Now drag the β€œExamineManagersContainer” and the β€œExamineCanvasContainer” from the β€œPrefabs” folder into the hierarchy. NOTE: Only drag this prefab into the hierarchy, not the scene.
9. Click on the β€œMainCamera” again and find the β€œExamineRaycast” crosshair slot in the inspector, and add the new β€œCrosshairUI” to that slot. (Navigate to β€œManagers” > β€œCanvas Container” > β€œCanvas” > β€œCrosshairUI” to find the crosshair).
11. Make sure the β€œMainCamera” is tagged as β€œMainCamera”
12. Inside the β€œExamineManagersContainer” container in the Hierarchy, find the β€œDisable Manager” gameobject. Click on it and you will need to add the specific references in the inspector.
  • Add the β€œCrosshairUI” to the β€œCrosshair” slot like we did on the camera.
  • Add your β€œPlayer” object (Usually β€œFPSController” to the β€œPlayer” slot).
  • Add the β€œExamineRaycast” which will be located on the β€œMainCamera” to the β€œRaycast Manager” slot.
  • Add the β€œMainCamera” to that slot which will automatically find the β€œBlurOptimized” script for you. See screenshot.
13. Inside the β€œManagers_Examine” again will have a GameObject called β€œUIManager” – Make sure this has the correct connections for enabling and disabling the UI. See screenshot below:
  • Add the Basic Item UI’s to the respective slots
  • Add the Right side UI’s to the respective slots
14. You can set the inputs using the β€œExamineInputManager”.
15. Everything is ready for you to start adding 3D Objects to your scene. Add your first 3D object or add ones from the β€œPrefabs” folder. Add the β€œInteractiveObjects” prefab to your hierarchy or scene.
16. Select the "ExaminePoint" (Which is parented to your main camera) and set the tag to "ExaminePoint".
16. Make sure that any object you wish to interact with has a:
  • Box Collider
  • "ExamineItemController" script
Add the β€œExamineItemController” script from the β€œScripts” folder. (If not already)
Camera Options
Initial Rotation for Objects
If the controller script is added to a parent object which has no mesh renderer, tick this box to avoid errors
Has Children
This is if your parent object has children, add these children to the array to make sure their emissions and status change during interaction
Initial Rotation Offset
Set your default rotation for your object to be displayed when examining by adjusting the X, Y, Z values.
Zoom Settings
Initial Zoom
The initial distance the object is away from the camera (Lower value is closer)
Zoom Range
The range where you can use the scroll wheel to zoom in and out
Zoom Sensitivity
The sensitivity of the zooming capability
Examine Rotation
Rotation Speeds
Set the speed of the X and Y rotation speed of for the object.
Emissive Highlight
Whether the system should use the emission slot in your material to create an object highlight or a text highlight
UI Settings - Text Customisation
UI Type
The type of display UI you would like: Bottom, right or none! Item Name: Give your object any name you like and it will be add to the text component which sits in the canvas. Edit as you wish.
Item Description
Give the objects a short description for examine purposes.
General Font Settings for each type
Adjust these as you wish!
Copy link