Skip to content

Draw Line with width#3

Open
KHN190 wants to merge 2 commits intoGeri-Borbas:masterfrom
KHN190:master
Open

Draw Line with width#3
KHN190 wants to merge 2 commits intoGeri-Borbas:masterfrom
KHN190:master

Conversation

@KHN190
Copy link

@KHN190 KHN190 commented Dec 19, 2020

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.

@Geri-Borbas
Copy link
Owner

Geri-Borbas commented Dec 19, 2020

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 - 1e06360 - aims to fix?

@KHN190
Copy link
Author

KHN190 commented Dec 19, 2020

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
Copy link
Author

KHN190 commented Dec 19, 2020

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants