Geri-Borbas / Unity.Library.eppz.Geometry

2D Geometry for Unity. Suited for everyday polygon hassle. Polygon clipping, polygon winding direction, polygon area, polygon centroid, centroid of multiple polygons, line intersection, point-line distance, segment intersection, polygon-point containment, polygon triangulation, polygon Voronoi diagram, polygon offset, polygon outline, polygon buffer, polygon union, polygon substraction, polygon boolean operations, and more. It is a polygon fest.
Other
321 stars 58 forks source link

Singleton LineRendererCamera Not Initialised — Unity 2019.3 #4

Open HulloImJay opened 4 years ago

HulloImJay commented 4 years ago

Trying this library out as it looks very helpful! But I'm hitting an error when running all the example scenes.

NullReferenceException: Object reference not set to an instance of an object EPPZ.Lines.LineRendererCamera.AddDirectRenderer (EPPZ.Lines.DirectLineRenderer renderer) (at Assets/22. Assets — 3rd Party/Unity.Library.eppz/Unity.Library.eppz.Lines/LineRendererCamera.cs:51) EPPZ.Lines.DirectLineRenderer.Awake () (at Assets/22. Assets — 3rd Party/Unity.Library.eppz/Unity.Library.eppz.Lines/DirectLineRenderer.cs:32)

This seems to be some failure to initialise the singleton?

To get the library working I also added Unity.Library.eppz.Lines and the required define symbol. And I thought the singleton issue might be related to the missing execution order utility, so I also added Unity.Library.eppz.Utils, but this did not correct the above error.

Unity 2019.3.7f1 macOS 10.15.5

HulloImJay commented 4 years ago

Also received warnings regarding the GUI Layer component being removed from the camera. I thought this was unrelated, and the missing component on the camera was only that issue. HOWEVER, it appears to actually be the required LineRendererCamera component!

Screen Shot 2020-06-19 at 17 10 19

Added a LineRendererCamera to the camera and assigned one of the materials (not sure which is correct) and the sample scenes run.

But why would that reference have become broken...? I cloned the repo directly from the terminal into a subfolder of my project and inited the submodules.

Geri-Borbas commented 4 years ago

Hi, at the moment I'm not supporting this repository. However, if I recall right, I accidentally hooked up some external dependency (probably line renderers) available only in Unity.Library.eppz.

I recommend to use that library as a starting point, and remove unnecessary stuff gradually. Hope that helps! 😅