stereolabs / zed-unity

ZED SDK Unity plugin
https://www.stereolabs.com/documentation/guides/using-zed-with-unity/introduction.html
MIT License
243 stars 57 forks source link

`ScriptableRenderContext` could be not found #257

Closed waltejon closed 1 year ago

waltejon commented 1 year ago

Preliminary Checks

Description

I have an issue while importing the Unity plugin.

Steps to Reproduce

  1. Create new 3D (URP) project
  2. Assets > Import New Package > Custom Package ... > Unity Plugin 4.0.3
  3. Project Settings > XR Plugin Management > Install XR Plugin Management System

Expected Result

I expected to be able to import the Unity plugin without issues. Furthermore, after the import, I expected be able to run a ZED example scene, e.g., an example scene for the body tracking.

Actual Result

The Unity console shows the following error:

Assets\ZED\SDK\Helpers\Scripts\MR\ZEDMixedRealityPlugin.cs(662,32): error CS0246: The type or namespace name 'ScriptableRenderContext' could not be found (are you missing a using directive or an assembly reference?)

image

image

image

ZED Camera model

ZED2

Environment

Windows 10
Intel i9
Nvidia RTX 3090
ZED SDK 4.0.3
ZED Unity Plugin 4.0.3

Anything else?

No response

waltejon commented 1 year ago

I also followed the „How to get started“ steps from here: https://www.stereolabs.com/docs/unity/.

Maybe not relevant in this context, but the context menu in my Unity 2022.3 editor are different to the steps above - for example, to create such a universal rendering pipeline asset

SLJLMacarit commented 1 year ago

Hi @waltejon,

I think this post on the forum should help: Unity ScriptableRenderContext Error when trying example scene

Add using UnityEngine.Rendering; at the beginning of Assets\ZED\SDK\Helpers\Scripts\MR\ZEDMixedRealityPlugin.cs. We'll soon release a fix to this oversight.

Best, Jean-Loup

waltejon commented 1 year ago

@SLJLMacarit: Yes, this hint solved my issue. Thank you!