URP Setup
Last updated
Last updated
Make sure to create tags called:
InteractiveObject
ExaminePoint: Tag for the ExaminePoint gameobject parented to the ExamineCamera
InspectPoint: Tag for every single inspect point that exists for an object
Create Layers:
User Layer 8: ExamineLayer (Doesn't need to be added to objects, referenced in code)
User Layer 9: InspectPointLayer (Tag for every single inspect point)
User Layer 10: PostProcess
User Layer 11: PadlockSpinner
LAYER NOTE: If you can place these on the corresponding User Layers (As above) it is easier for setup, as Unity will automatically place them in the correct places so the below information might not be all relevant to you. (It's worth checking through just encase!)
Importing Tips:
Import into a fresh project rather than a working project, to avoid issues
Always keep a backup of your working project BEFORE importing ANY assets
In the Import Unity Package dialog which shows all assets to be imported. DO NOT import project settings -- UNTICK that entire section
You will get import errors that refer to Post Processing - We'll fix those below
Open the AKUIManager -- Change the top line from:
AK - UIManager -- Find the GasMask Fields section (Open that out) > Post Processing Effects fields and replace them with:
In the AK - UI Manager -- Inside the Awake() method you will see these lines:
I recommend opening the FirstPerson_DemoScene and do the steps below rather than using the prefab at the start (As when compile errors appear, it can cause prefab issues until it's fixed)
All materials will need updating so please navigate to: Window > Rendering > Render Pipeline Converter and then select:
Choose: Built-in to URP from the dropdown
Click the Material Upgrade checkbox
Then press: Initialize Converters
Then select: Convert Assets
Go to the Post Processing Volume GameObject (This can be an empty GameObject, so don't worry too much)
Add a Volume component (Specific to URP)
Set it's layer to PostProcess (if not already)
Create a new post processing volume by clicking NEW
Call this "GasMaskURP_PP_Profile" (Or something that you will remember)
Add Vignette: Set the intensity to: 0.485
Add Depth of Field:
Set the Mode to Bokeh
Set Focus Distance to 0.1
Then disable these effects by the main check boxes (These checkboxes are next the names of the effect)
Then you can duplicate the GasMaskURP_PP_Profile or create a new profile called Original_PP_Profile (This is so we can switch between them)
Then open the AK - UIManager object
Open the Gas Mask Properties (By selecting the checkbox next to the Gas Mask Properites)
Add the Volume (Most likely your GameObject called Post Processing Volume - Which has the Volume component on it)
Add the two profiles you just created to these slots for the Gas Mask and Original (You can click the little find box next to each, to find corresponding GameObjects you could use)
Open the AKDisableManager script
Add the two namespaces to the top of the script:
Add these fields:
Add this to the Awake() method:
In the If(IsExamine) sections add this:
Add Layers (They don't need to be on the layers specified but it's an easier setup if that's the case)
User Layer 8: ExamineLayer (Doesn't need to be added to objects, referenced in code)
User Layer 9: InspectPointLayer (Tag for every single inspect point)
User Layer 10: PostProcess
User Layer 11: PadlockSpinner
Select your Main Camera and set the Culling Mask so that you UNTICK the
ExamineLayer
InspectPointLayer
PostProcess
In Rendering TICK the Post Processing checkbox
In the Environment > Volumes > Volume Mask - Add PostProcess
Make sure this has a Physics Raycaster script and the Mask is set to: PadlockSpinner
Select the Examine Camera and make sure the Culling Mask is set to
ExamineLayer & InspectPointLayer
Select the Examine Camera and make sure it’s type is Overlay Camera and NOT Base. (Only one camera, your main camera should be set to Base)
On the Main Camera find the Stack options and click the + icon and now add the ExamineCamera to this slot
Look at the Deferred Rendering section on the left bar if you're having issues whilst using a deferred setup
Go into the Prefabs > Spawnable > Padlock folder and open the brass and black padlocks seperately, select all of the combination spinners and make sure the all have the layer of PadlockSpinner.
Open the Examine - Objects (Child of Puzzle Objects, in the Hierarchy)
Find any object which has Inspect Points
Make sure these inspect points have a layer of InspectPointLayer (Or they will not render correctly)
Drag into your scene the APK_EntireDemoScene_Prefab (Adventure Puzzle Kit > Prefabs > Demo Scene Prefab)
All should be complete and ready to use, if you added the prefab from the folder