Detailed Setup
Setting up Tags
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)
Player Setup:
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.
Controller / Camera Setup
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!
Managers - Setup
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
Disable Manager Setup:
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.
Input Manager Setup:
You can set the inputs using the ExamineInputManager
Audio Manager Setup:
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
UI Manager Setup
Select the UIManager – Make sure this has the correct connections for enabling and disabling the UI. See screenshot below:
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
Examinable Item - Setup
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)
Examinable Item - Detail
Adding Inspect Points, Events & Other Custom:
Last updated