Skip to content

Add overlay camera into CameraStack for Scriptable Render Pipeline

License

Notifications You must be signed in to change notification settings

upm-packages/CameraStackHandler

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CameraStackHandler

Installation

upm add package dev.upm-packages.camerastackhandler

Note: upm command is provided by this repository.

You can also edit Packages/manifest.json directly.

{
  "dependencies": {
    // (snip)
    "dev.upm-packages.camerastackhandler": "[latest version]", 
    // (snip)
  },
  "scopedRegistries": [
    {
      "name": "Unofficial Unity Package Manager Registry",
      "url": "https://upm-packages.dev",
      "scopes": [
        "dev.upm-packages"
      ]
    }
  ]
}

Usages

Upgrade the version of URP to v7.2.0 or higher

image

As of Unity 2019.3.7f1, the Verified version is v7.1.8, so you'll need to expand the ▶ to the left of the Universal RP to find the latest version.

Add component into Overlay Camera

image

  1. Select Overlay to Render Type field of Camera component.
  2. Add AddOverlayCameraToCameraStack component.

Note

  • AddOverlayCameraToCameraStack component will find Overlay Camera automatically from same GameObject on runtime. You can also set Overlay Camera manually.
    • Set field automatically when component attached (and invoked Reset).
  • Overwrite Render Type to Overlay on runtime if Overwrite Render Type field is set to true.

Run

image

Add Overlay Camera into Camera Stack of Base Camera automatically.

The base camera to be added is selected with the highest Priority value.

Notes

Camera Stack may not be configured well in some processing order.

This is directly due to the process of adding a Camera managed by the AddOverlayCameraToCameraStack Component to the Camera Stack of Base Camera.

When looking for a Base Camera to add, you can use Camera.depth (the value that appears as Priority in the Inspector.) values in descending order, the first one is used.

Therefore, it is recommended to set a large value in Camera.depth to fix the camera to be added correctly.

About

Add overlay camera into CameraStack for Scriptable Render Pipeline

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages