URP Setup

Do you need a URP version of the APK?

Just send an email to: speedtutoruk@gmail.com via my website with your invoice number and I'll happily send it your way. If not check the URP setup guides to do it all yourself!

Importing Notes & Troubleshooting

Tag & Layer Setup

  • 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

TextMeshPro Required

  • Please note that TMP will appear as a popup if not installed in your project

  • Click Import TMP Essentials to use the system fully

DontDestroyOnLoad yellow warning

Other Issues? Contact Me!

Contact Me

(Please Read) Important Import Suggestions

Download and import the Adventure Puzzle Kit from the package manager.

  • Window > Package Manager > Search for "Adventure Puzzle Kit"

Step 1 - Errors & FIxes On Import (URP)

You will get import errors that refer to Post Processing - We'll fix those below:

  1. Open the AKUIManager (Adventure Puzzle Kit > Scripts > Core > AKUIManager)

    1. Change the top line from:

//FROM THIS
using UnityEngine.Rendering.PostProcessing;

//TO THIS
using UnityEngine.Rendering;
using UnityEngine.Rendering.Universal;
  1. In the AKUIManager -- Find the GasMask Fields section (It will be a foldout group for all variables towards the top of the script)

    1. Towards the bottom of that fold out you will see: Post Processing Effects header and fields related and replace them with:

//OLD REFERENCES
[SerializeField] private PostProcessVolume _postProcessingVolume = null;
[SerializeField] private PostProcessProfile _originalProfile = null;
[SerializeField] private PostProcessProfile _gasMaskProfile = null;
private Vignette _vignette;
private DepthOfField _dof;

//CHANGE TO THIS
[SerializeField] private Volume _postProcessingVolume = null;
[SerializeField] private VolumeProfile _originalProfile = null;
[SerializeField] private VolumeProfile _gasMaskProfile = null;
private Vignette _vignette;
private DepthOfField _dof;
  1. In the AKUIManager -- Inside the Awake() method you will see these lines (Inside the Gas Mask Getting PP Settings foldout)

//OLD REFERENCES
_gasMaskProfile.TryGetSettings(out _vignette);
_gasMaskProfile.TryGetSettings(out _dof);

//CHANGE TO THIS
_gasMaskProfile.TryGet(out _vignette);
_gasMaskProfile.TryGet(out _dof);

Step 2 - APK Startup Window

The APK startup window should appear, you may need to expand the window to see all the button links (If they aren't visible).

  • You can dock this window if you wish and has FAQ information, contact buttons and helpful information.

Step 3 - Open the Demo Scene

We'll open the demo scene so we can get the basics setup to be used, follow steps below

  1. Navigate to Assets > Adventure Puzzle Kit > Scenes > FirstPerson_AdventureKit_Demo

  2. Double click to open this scene to start using it

Step 4- Upgrading Materials

EVERYTHING IS PINK?!??!! All materials will need updating so please navigate to:

  1. Window > Rendering > Render Pipeline Converter and then select:

    1. Choose: Built-in to URP from the dropdown

    2. Click the Material Upgrade checkbox

    3. Then press: Initialize Converters

    4. Then select: Convert Assets

All materials will be re-build for URP (Some custom materials may not have done so as they were Built-in specific)

Step 5 - Creating Tags & Layers

Select any GameObject in the Hierarchy and then create tags and layers in the top right of the inspector (Some or all tags may already be created)

  • 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

Step 6 - Creating New Post Processing

We'll be creating a new Post Processing volume for URP so we can use it in the system

  1. Find the Post Processing Volume GameObject (This can be an empty GameObject, so don't worry too much)

  2. Set the layer of this GameObject to PostProcess (if not already)

  3. Remove the associated script that is missing by clicking the 3 dots and choose Remove Component

  4. Choose Add Component

    1. Add a Volume component (Specific to URP)

  5. Create a new post processing volume by clicking NEW

    1. Call this GasMaskURP_PP_Profile (Or something that you will remember)

      1. Add Vignette: Set the intensity to: 0.485

      2. Add Depth of Field:

        1. Set the Mode to Bokeh

        2. Set Focus Distance to 0.1

        3. Then disable these effects by the main check boxes (These checkboxes are next the names of the effect)

  1. 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, and use all of your own effects relevant to your game)

  2. Open the AK - UIManager object

    1. Open the Gas Mask Properties (By selecting the checkbox next to the Gas Mask Properites)

      1. Add the Volume (Most likely your GameObject called Post Processing Volume) to the Post Processing Volume slot

      2. Add the two profiles you just created to these slots for the Gas Mask and Original Profile (You can click the little find box next to each, to find corresponding GameObjects you could use)

Step 7 - Editing The Disable Manager

We need to edit the disable manager to make sure we disable any blurs when we don't need them either when examining or otherwise

  1. Open the AKDisableManager script (Inside the Assets > Adventure Puzzle Kit > Scripts > Core)

    1. Add the two namespaces to the top of the script:

using UnityEngine.Rendering;
using UnityEngine.Rendering.Universal;
  1. Add these fields under the rest of the fields in this script:

[Header("Post Processing")]
[SerializeField] private Volume _postProcessingVolume = null;
private DepthOfField _dof;
  1. Add this to the Awake() method:

_postProcessingVolume.profile.TryGet(out _dof);
  1. In the SetCameraAndPlayerState method you can add this anywhere in the script:

if (_dof != null)
{
    _dof.active = disable && isExamine;
    _dof.focusDistance.value = (disable && isExamine) ? 0.1f : 10f;
}
  1. Make sure to add the Post Processing Volume GameObject to the AKDisableManager in the inspector

Step 8 - Setting Up Main Camera

We need to make sure we setup camera stacking for additional examination rendering and appropriate layers for culling objects away, for best optimisation

  1. Select your Main Camera usually a child of the FPSController (APK - FPS Controller > FPS Controller > Main Camera)

  2. Look at the Culling Mask under the rendering section and UNTICK

    1. ExamineLayer

    2. InspectPointLayer

    3. PostProcess

  3. In Rendering section of the Main Camera

    1. TICK the Post Processing checkbox

  4. In the Environment section > Volumes > Volume Mask

    1. Set the Volume Mask to have PostProcess ticked and everything else UNTICKED

  5. Make sure the camera has a Physics Raycaster script component attached (If not add the component)

    1. Set the Event Mask to PadlockSpinner

    2. Leave Max Rays to 0

Step 9 - Examine Camera & Stacking

We'll Look at the examine camera now, to make sure we have everything setup for examining with this camera

  1. Select the Examine Camera (This is a child of the Main Camera)

    1. Make Culling Mask has the ExamineLayer & InspectPointLayer TICKED ONLY!

  2. Select the Examine Camera — Select the Render Type drop down (At the top of the camera)

    1. Make sure it’s type is Overlay Camera and NOT Base. (Only one camera, your main camera should be set to Base)

    2. You should now see the demo scene without the white screen — Wooohooo!

  3. On the Main Camera find the Stack option section

    1. Click the + icon and now add the ExamineCamera to this slot

Step 10 - Using Deferred Rendering?

Deferred rendering doesn't allow camera stacking so we need a little work around for this, I have details on this too

Look at the Deferred Rendering section on the left bar if you're having issues whilst using a deferred setup

Step 11 - Checking Prefabs

We just need to check we have the correct layers on the padlock spinners or they won't be detected properly

  1. Go into the Prefabs > Spawnable > Padlock folder

    1. Open the brass and black padlocks seperately (By double clicking the prefabs)

    2. Select all of the combination spinners and make sure the all have the layer of PadlockSpinner (In the top right of the inspector when you select the spinners)

Step 12 - Check Examination Objects

We just need to check examine objects have the correct layers on their inspect points (So they render correctly)

  1. Inside the Puzzle Objects GameObject folder in the Hierarchy

  2. Open the Examine - Objects

    1. Find any object which has Inspect Points (The knife will have some by default)

    2. Make sure these inspect points have a layer of InspectPointLayer (Or they will not render correctly)

  3. You can check any other object which has inspect points but should be setup by default!

Step 13 - Add the Entire Scene Prefab

Drag into your scene the APK - Demo Scene - Prefab (Adventure Puzzle Kit > Prefabs > Demo Scene Prefab)

Step 14 - Enable Legacy Input System (If required)

We'll need to enable the legacy system if you're using Unity 6+ and it isn't enabled by default

NOTE: New input system support is coming in v1.8

  1. Go to Edit > Project Settings > Player > Other Settings

  2. Scroll down half way and you'll see Active Input Handling

  3. Set this dropdown to BOTH and press Apply (The editor will restart)

Others Issues? Contact Me!

Contact Me

Last updated