Unity.Library.eppz.Lines icon indicating copy to clipboard operation
Unity.Library.eppz.Lines copied to clipboard

Draw Line with width

Open KHN190 opened this issue 5 years ago • 3 comments

Hi, not sure the project still accepts PR but I updated two things:

  • The line drawing method changes from GL.LINES to GL.QUADS to support drawing with width.
  • Also moved LineRenderBase classes initialization to Start so they always init after the LineRendererCamera.

KHN190 avatar Dec 19 '20 07:12 KHN190

Wow, thanks, sure! Using quads is a great idea!

Yet it is a bit more change (yet it seems to due to formatting/tab changes all around) to merge without testing, so it may take a while until I find time for that. Could be helpful if you could commit the changes without changing tabbing from tabs to spaces, so the diffs would be much cleaner / easier to review.

Alternatively, you may post a screencap of the example scenes in the Geometry project (https://github.com/Geri-Borbas/Unity.Library.eppz.Geometry), that is embedded into a main repo (https://github.com/Geri-Borbas/Unity.Library.eppz) where it heavily uses line renderer (and more).

Regarding initialization order, the line renderers are being collected by the camera on awake already. Could you please explain what was the issue that this commit - https://github.com/Geri-Borbas/Unity.Library.eppz.Lines/pull/3/commits/1e063601c3b3c540abbadfe5667c9ff3454df7ef - aims to fix?

Geri-Borbas avatar Dec 19 '20 11:12 Geri-Borbas

what was the issue that this commit - 1e06360 - aims to fix?

In my setup the script load order for LineRenderBase inherited classes is before LineRendererCamera so the next line call AddCachedRenderer hits a null camera object, it is still an issue on my side. The load order can be solved using XML but I think in this case the quick fix is just moving from Awake to Start. Maybe there's a better way?

Could be helpful if you could commit the changes without changing tabbing

Sure, tabs' formatted by VS, I can revert them.

KHN190 avatar Dec 19 '20 21:12 KHN190

I cleaned up the tabs so now it should be easy to get reviewed :)

I didn't check into the geometry project but I was using the lib heavily in my game to draw 2D geometries.

eppz_lines

KHN190 avatar Dec 19 '20 22:12 KHN190