|
Post by ahakuo on May 27, 2021 8:13:46 GMT
Hello there!
I have an issue with the parallax system of Pro Camera 2D
My project has no render pipeline (i.e., Standard Built-in)
And because of that, when the parallax camera layers add this component to themselves (Universal Additional Camera Data), that component starts throwing me errors when it tries to get my _scriptableRenderer. And that is because I don't have one. The errors are:
NullReferenceException: Object reference not set to an instance of an object UnityEngine.Rendering.Universal.UniversalAdditionalCameraData.get_scriptableRenderer () (at Library/PackageCache/com.unity.render-pipelines.universal@8.2.0/Runtime/UniversalAdditionalCameraData.cs:285) UnityEngine.Rendering.Universal.UniversalAdditionalCameraData.get_cameraStack () (at Library/PackageCache/com.unity.render-pipelines.universal@8.2.0/Runtime/UniversalAdditionalCameraData.cs:221) Com.LuisPedroFonseca.ProCamera2D.ProCamera2DParallaxEditor.OnInspectorGUI () (at Assets/ProCamera2D/Code/Extensions/Editor/ProCamera2DParallaxEditor.cs:292) UnityEditor.UIElements.InspectorElement+<>c__DisplayClass58_0.<CreateIMGUIInspectorFromEditor>b__0 () (at <67055f1be3654e2a987254d5437ee5b8>:0) UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)
This error is constantly being thrown. It doesn't come once only. And it increases in number whenever I try to change the culling mask of any parallax layer.
Because of this, I am unable to change the culling mask on any of the cameras.
Please help me with this. I would prefer not having a render pipeline as my project has lots of assets that don't support it.
Thank you
|
|
|
Post by Luís Pedro Fonseca on May 27, 2021 8:36:47 GMT
ahakuoThat's an odd error. The Parallax extension should also work with the built-in renderer. Only recently I've added support for the SRP's. Can you please send me a sample project (through PM) that replicates the issue? Thanks!
|
|
|
Post by ahakuo on May 27, 2021 9:00:23 GMT
ahakuo That's an odd error. The Parallax extension should also work with the built-in renderer. Only recently I've added support for the SRP's. Can you please send me a sample project (through PM) that replicates the issue? Thanks! Well, actually. I don't think I need to. The error appears in the example scene that comes with the package. It's not only in my own scene. And I don't know why. The error mainly stems from the Universal Additional Camera Data component. Which I believe is supposed to be for the URP. But my project is running on it. And whenever I try adding a parallax layer with your component, the Universal Additional Camera Data is added automatically. I don't know why. I tried replicating the problem in a completely new project in the latest version of unity. And the problem doesn't happen anymore because the Universal Additional Camera Data component does not get added. I even tried it on a new project with the same version as my current project (which has the problem) and that component is not being added. Is there something that could be adding it automatically? Could it be a project setting error? Is there a conflict with cinemachine maybe? I don't understand why it's happening.
|
|
|
Post by ahakuo on May 27, 2021 9:15:09 GMT
Apparently, the scripts think I'm using URP when I'm not.
I don't know why.
I removed the URP Package completely and now the parallax editor is causing me another error:
It says that, inside the parallax editor script, the namespace Universal does not exist. And this is after an if condition (#if USING_URP). I don't know how it's returning true for that. My project is not using URP at all. I had to comment out the URP details to stop these errors.
|
|
|
Post by Luís Pedro Fonseca on May 27, 2021 9:20:11 GMT
ahakuoI see, it seems your project somehow is configured to use URP. If the issue doesn't occur on a new project then it's hard to fix because it's only occurring on yours. My suggestion would be to try to look into your package manager and remove everything related to SRP's and then reimport the project.
|
|