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

UI World Canvas #125

Open
slacker-jake opened this issue Dec 6, 2021 · 3 comments
Open

UI World Canvas #125

slacker-jake opened this issue Dec 6, 2021 · 3 comments
Labels

Comments

@slacker-jake
Copy link

slacker-jake commented Dec 6, 2021

Hi,

Thank you for your plugin however I have a problem I hope I can have solved. The PointCloud is rendering fine but as soon as a WorldSpace Canvas with an Image/Text inside the bounds of the MainCamera the position of the point cloud is reset to that Canvas element location.

Have you seen or encountered this?

Thanks, Jake

p.s Running in URP

@unitycoder unitycoder added the bug label Dec 6, 2021
@unitycoder
Copy link
Owner

if you can try this, it fixes the issue for me:
#126

(if you have newer unity version, or urp, let me know which one, if that code doesn't work there)

@unitycoder
Copy link
Owner

unity confirmed this as a bug also,
https://issuetracker.unity3d.com/issues/graphics-dot-drawproceduralnow-from-onrenderobject-breaks-when-worldspace-canvas-is-in-cameras-view

and gave one workaround:
"I have noticed that creating a new Universal RP project and reimporting your Assets folder makes the drawing render as intended."

@unitycoder
Copy link
Owner

unitycoder commented Feb 18, 2022

unity added more info, that its by design:

After a further resolution with developers, we have decided that this issue is By Design due to the following reasons:
The procedural geometry is being rendered after the UI panel so it is using the UI panel's transform, which is by design. The docs for https://docs.unity3d.com/2019.1/Documentation/ScriptReference/Graphics.DrawProceduralNow.html explain "Note that this call executes immediately, similar to Graphics.DrawMeshNow. It uses the currently set render target, transformation matrices and shader pass".

https://docs.unity3d.com/ScriptReference/Graphics.DrawProcedural.html or https://docs.unity3d.com/ScriptReference/Rendering.CommandBuffer.DrawProcedural.html may be more suitable for this use case.

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

No branches or pull requests

2 participants