Normal view

There are new articles available, click to refresh the page.
Before yesterdayUnity Forum

Roslyn Analyzer for Unity package

Im currently working on a package that provides a framework, and want to write some custom DiagnosticAnalyzers for the correct usage of it.
Ive written a few for non-Unity projects before, so my question is not about the analyzers themselves, but rather about how to best integrate them within a Unity project.

As far as official documentation goes, this page is all I could find.
On there, they suggest you build the analyzer...

Roslyn Analyzer for Unity package

Accurate cone casting

Im currently trying to implement a cone cast. The solution Ive found for this online a lot is to do a SphereCast and then filter the results by the angle between the direction of the cast and the vector from the starting point of the cast to the hitpoint. If the angle is higher than some given cone angle, filter that hit out of the results. The issue I see with this is that if an object is hit by the SphereCast both outside and inside of the cone angle, that object will be registered as...

Accurate cone casting
❌
❌