Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unity 2020.2 - UnityException: GetRecorderInternal is not allowed to be called during serialization #33

Open
adamgryu opened this issue Jan 25, 2021 · 12 comments

Comments

@adamgryu
Copy link

adamgryu commented Jan 25, 2021

I see this exception when loading the project in Unity 2020.2.
The decals don't work unless I move m_RenderPass = new DecalRenderPass() into Create().

Perhaps unrelated, but after doing that, attempting to open the FrameDebugger crashes Unity.

@CianNoonan
Copy link

I've also found this to be faulty in 2020.2

@adamgryu
Copy link
Author

Just as a heads up, I tried porting this forward to work in Unity 2020.2:
https://github.com/adamgryu/kDecals

I also stumbled upon someone else who did the same thing.
I don't know a lot about the URP, maybe they did it better! Dunno!
https://github.com/dOObgames/kDecals

@henriquebach
Copy link

Have anyone found a solution for this?

@fleity
Copy link

fleity commented Feb 24, 2021

the fix mentioned by adamgryu seems to work.
Moving m_RenderPass = new DecalRenderPass(); in DecalRendererFeature.cs into the Create() Function resolves the error for me. I actually did not try this with this decal repository but Motion Blur and completely different TAA repo and they both now work.

@StarManta
Copy link

@adamgryu The project I'm on has this package added via the package manager, which (I believe) can only choose commits with tags to sync down. The most recent tag (2.0.0) is from a few days before this thread and does not have this fix, so I can't update (unless I remove the git from package manager and pull it down elsewhere, which is taking some steps backwards). Could you please push up a version with a tag on a commit with the fix?

@CianNoonan
Copy link

CianNoonan commented Apr 11, 2021 via email

@StarManta
Copy link

@CianNoonan I don't seem to be able to. When I add in the SHA to the URL:

{
  "dependencies": {
    "com.kink3d.decals": {
      "version": "https://github.com/Kink3d/kDecals.git#a22ee8adf12f0fab5ff109931471fd7794555238",
      "depth": 0,
      "source": "git",
      "dependencies": {
        "com.kink3d.pooling": "0.1.0",
        "com.unity.render-pipelines.universal": "7.x.x"
      },
      "hash": "a22ee8adf12f0fab5ff109931471fd7794555238"
    },
    "com.kink3d.pooling": {

I switch to Unity, it says "Resolving packages" for a second, and then changes the file back to what it was, and the GetRecorder error is still there.

@CianNoonan
Copy link

Where did you get a22ee8adf12f0fab5ff109931471fd7794555238 from? I cant find that sha anywhere. a72ab04b0c37e03b13728f9c5f2b98bce9df7076 is the sha for the release 2.0.0 tag. What happens if you try using that

@fleity
Copy link

fleity commented Apr 12, 2021

@StarManta
hm I believe the reason it is not working is that you try to clone the repo from Kink3d's github but with adamgryu's commit hash? Which is kind of understandable since the readme is not updated automatically to reflect the new account when a repo is forked.

This works for me (specifying package dependencies the way you did doesn't):
"com.kink3d.decals": "https://github.com/adamgryu/kDecals.git#a22ee8a",
"com.kink3d.pooling": "https://github.com/Kink3d/kPooling.git",

@StarManta
Copy link

Where did you get a22ee8adf12f0fab5ff109931471fd7794555238 from? I cant find that sha anywhere. a72ab04b0c37e03b13728f9c5f2b98bce9df7076 is the sha for the release 2.0.0 tag. What happens if you try using that

I don't need 2.0.0, that's the bugged one that I already have. a22 is the one adamgryu linked above, I'm confused what other commit you would think I would be trying in this thread other than "the fixed one"?

@fleity I tried that syntax as well, with the exact same result: Unity reverts packages-lock to what it looked like before and the bug remains.

@CianNoonan
Copy link

It sounds like an esoteric package manager issue if it keeps failing.

When I tried to add Adamgryu's repo locally I got some dependency errors. Are you sure its not erroring and then reverting to the last working version?
image

@adamgryu
Copy link
Author

adamgryu commented Apr 12, 2021

Sorry you're having trouble with this. I don't plan to maintain my fork of kDecals (while I got my fork working, I introduced a serious performance issue by not culling during the kDecals pass - Unity kept crashing otherwise) so you might be better off just downloading a copy of the repo instead of using the package manager.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants