Detailed Setup
Last updated
Last updated
You can check out the GameObject Tag Reference page for details on all objects that will need tags or layers.
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)
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.
The FPSController will be setup like so:
It will have a Main Camera parented to it
The Main Camera will have another camera called the ExamineCamera parented to it.
Examine Camera should be setup like this:
Clear Flags: set to Depth ONLY (Which means it will only render things we specify and will lower the overhead on rendering your scene in a different camera view.
Culling mask: ONLY have ExamineLayer & InspectPointLayer TICKED
Depth: set to 1
On your MainCamera make sure the Culling Mask has these two layers unticked
ExamineLayer
InspectPointLayer
Please navigate to the scripts folder and add the ExamineInteractor script to your MainCamera. (If not already from the FPSController_Prefab I have provided)
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.
No fear, adding blurs is fairly simple in either pipeline. I have written guides in the toolbar for both URP and HDRP. I also have several projects you can import, just contact me and I'll happily explain more!
Now drag the Managers from the Prefabs folder into the hierarchy. NOTE: Only drag this prefab into the hierarchy, not the scene.
ExamineAudioManager, ExamineDisableManager, ExamineInputManager, ExamineUIManager
Select the Disable Manager gameobject. Click on it and you will need to add the specific references in the inspector.
InteractorScript: Add the main camera to this slot to access the raycast script
Player: Add your Player object (Usually FPSController to the Player slot).
Blur: Add the MainCamera to that slot which will automatically find the BlurOptimized script for you. See screenshot.
You can set the inputs using the ExamineInputManager
Select the ExamineAudioManager and open the Sounds array and add each of the ScriptableObject sounds, which can be found in the ScriptableObjects folder.
You can add more to this list if you want to add new sound effects - Check out the page below for more detailed information
Select the UIManager – Make sure this has the correct connections for enabling and disabling the UI. See screenshot below: (All UI canvases should be a child of this object)
Add the NoUICloseButton UI element to the slot
Add the Basic Item UI’s to the respective slots
Add the Right side UI’s to the respective slots
Add the interaction Item name and description UI
Add the Interest point UI and parent
Add the Crosshair and Examine Help UI
Add your first 3D object or add ones from the Prefabs folder. Add the InteractiveObjects prefab to your hierarchy or scene. Make sure that any object you wish to interact with has:
Box Collider
ExaminableItem script (Add the ExamineItemController script from the Scripts folder. If not already)
-
Camera Options
IsEmptyParent
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
Has Inspect Points
Tick this if the object has inspect points, add them to the array as well. Check out the demo scene to see some basic setups
Highlight Settings
Whether the system should use the emission slot in your material to create an object highlight or a text highlight
Rotation Speeds
Set the speed of the rotation and whether you want the rotation to be inverted or not
Offset settings
Initial Rotation Offset: Set your default rotation for your object to be displayed when examining by adjusting the X, Y, Z values. Horizontal / Vertical Offset: Set these if you want the object to appear offset compared to a middle screen position
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
Text Settings
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 Name Settings
Settings for the item name
Item Description Settings
Give the objects a short description for examine purposes.
Audio Settings
Add the picking up and dropping ScriptableObjects