Here is a Playground where I set DefaultSide/FrontSide & frontUVs but it shows the whole picture instead of specified region. Why does it work like this?
It accepts UVs only when I use DoubleSide option.
Here is a Playground where I set DefaultSide/FrontSide & frontUVs but it shows the whole picture instead of specified region. Why does it work like this?
It accepts UVs only when I use DoubleSide option.
Yes, the code takes frontUVs
/backUvs
into account only when sideOrientation
is DOUBLESIDE
(I guess it was an option added only for this use case).
A workaround is to modify the uv vertex buffer yourself:
But how to pass UVs in other way if I wanna use just one sided-plane? If I use frontUVs it works only for doubleside plane
My PG just does that, the plane is one-sided (_sideOrientation
is not a known property name by CreatePlane
, so its value won’t be taken into account).
You can also create a function to encapsulate the code:
@Evgeni_Popov, could you please take a look at this example? I’ve just found there is: “Active Faces: 2” in Inspector. Could you please tell me why there are two faces if this is one-sided plane? Is it correct? Looks like we have 2 faces in any way but we don’t see it though. So what about performance? I need it to use as 2D Sprites with UV manually specified, top camera view, so I don’t need to have a back face.
There are two faces because the plane is divided into 2 triangles. “faces” in the inspector means “triangles”, as the GPU can only deal with triangles.
Oh I didn’t know this, thanks for clearing it! I was only familiar with Blender’s faces.