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

[1.2.2] LineRenderer.BakeMesh failing unexpectedly #49

Open
techanon opened this issue Aug 24, 2022 · 2 comments · Fixed by #81
Open

[1.2.2] LineRenderer.BakeMesh failing unexpectedly #49

techanon opened this issue Aug 24, 2022 · 2 comments · Fixed by #81
Assignees
Labels
bug Something isn't working Needs QA BC

Comments

@techanon
Copy link

When trying to create a mesh from a LineRenderer, in ClientSim the behavior is crashing upon calling line.BakeMesh(mesh, true);.
This call works fine in-game via build and test.
I think CS is trying to force use the 3 param override BakeMesh(Mesh, Camera, bool) instead of the 2 param method because the failure mentions Camera being null:
image

@Hunterk1241
Copy link

I have been having the same issue when working with QVPen. At first, I thought it broke on my end, but it turned out to just be ClientSim. Definitely an issue!

@kaikoga
Copy link

kaikoga commented Apr 24, 2023

This is because 2 param overload of LineRenderer.BakeMesh(Mesh, bool) internally references Camera.main, which does not exist in ClientSim because no active camera is tagged with MainCamera while ClientSim session.

I suppose overriding the tag of PlayerCamera object in Packages/com.vrchat.clientsim/Runtime/Resources/ClientSim/Prefabs/ClientSimPlayerLocal.prefab with MainCamera should fix this problem, which should have no side effects as long as Camera.main and GameObject.FindGameObjectWithTag("MainCamera") are not exposed to Udon, and LineRenderer.BakeMesh(Mesh, bool) is working in-game anyway.

@KhopeshActual KhopeshActual added bug Something isn't working Needs QA BC labels Apr 28, 2023
@momo-the-monster momo-the-monster linked a pull request May 3, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Needs QA BC
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants