Polygon doesn't appear

Avatar
  • updated
  • Under Review

Hello,

I have got very strange issue.

I have Polygon component on the Canvas,

also i have tried to create a component by script with the same results.

Polygon is successfully inited, but I can't see anything.

When I tried to change anything in the component in EDITOR - it comes to appear.

It could be changing any coordinate of any point, or changing BlendMode,

or just disable and enable the component.

Right after any of these operations in EDITOR - I see the polygon.

I tried to do the same by code but it doesn't appear at all.

I have tried to disable/enable, change points, call force update mesh by polygon.UpdateMesh(true).

I tried to use delays by coroutine and many other ways, no success.

Help please with this issue.

I used Shapes version 2.3.2, then updated to the latest one 3.2.3,

Unity version is 2019.4.11

Reporting a bug? please specify Unity version:
2019.4.11
Reporting a bug? please specify Shapes version:
3.2.3
Reporting a bug? please specify Render Pipeline:
Built-in render pipeline
Pinned replies
Avatar
Freya Holmér
  • Answer
  • Under Review

is it broken outside of the canvas too or does this only happen when it's inside of a canvas?

Avatar
Freya Holmér
  • Answer
  • Under Review

is it broken outside of the canvas too or does this only happen when it's inside of a canvas?

Avatar
Alex Gongalsky

it's inside.

However, it doesn't matter.

I guess the component doesn't init or so..

Also the same things happen with the Quad component.

I tried to debug, and all code inside Shapes is running correctly, it's inited and running. 

Avatar
Freya Holmér

what do you mean by doesn't matter? keep in mind that shapes (and any other mesh renderers) aren't compatible with Unity's overlay canvas UI, they might not work unless you make the canvas world space or move them out of the canvas

Avatar
Alex Gongalsky

Yes, I understand about canvas type, but it works after update any parameter in EDITOR only!

Avatar
Freya Holmér

do your shapes work when they're outside the canvas?

Avatar
Alex Gongalsky

Yes, I use lines and circles by script, using world coords from the scene, without canvas

Avatar
Alex Gongalsky

I figured this issue out

I have SkyShop environment system with its specific sky.

When I switched it off - Polygon works as expected.

Avatar
Freya Holmér

I think the problem is that Unity's canvas just doesn't support mesh renderers (which is what Shapes is using), which is what I'm guessing is happening here

Avatar
Alex Gongalsky

but it works when I disable SkyShop sky component..

Avatar
Freya Holmér

it could be that the sky is rendering on top of the shapes somehow? I don't know how skyshop works I'm afraid