Arvtesh / UnityFx.Outline

Screen-space outlines for Unity3d.
MIT License
1.28k stars 90 forks source link

Errors when running profiler #52

Open mihakrajnc opened 2 years ago

mihakrajnc commented 2 years ago

I'm using outlines with URP, and when opening the profiler, I get spammed with errors:

Non matching Profiler.EndSample (BeginSample and EndSample count must match): OutlinePass
Previous 5 samples:
    Gfx.SetRenderTarget
    Outline-1024
    Gfx.SetRenderTarget
    OutlinePass
    Outline-1024
In the scope:
    Outline-1024
    ScriptableRenderer.Execute: BaseRenderer
    UniversalRenderPipeline.RenderSingleCamera: Main Camera
    Render Thread

If I comment out the using (new ProfilingScope(cmd, _profilingSampler)) lines in OutlinePass.cs, the errors go away. Not sure if this is an issue with Unity or the OutlinePass.

Arvtesh commented 2 years ago

This a duplicate of #44. You can safely remove the line with ProfilingScope reference.

Arvtesh commented 2 years ago

I'm going to remove these line for the next version,

popcron commented 2 years ago

i get the exact same issue, commenting this line also aleviates it

BorpaBoatski commented 1 year ago

I notice this issue is still open. How can I comment out the line without it reverting back after package compilation?

abogarsukov-braingames commented 1 year ago

I notice this issue is still open. How can I comment out the line without it reverting back after package compilation?

Try installing is as local package (https://docs.unity3d.com/Manual/upm-ui-local.html). This should allow editing it as you like.

BorpaBoatski commented 1 year ago

Thanks @abogarsukov-braingames