Is there a HandleUtility.DistancePointLine() for a non-editor class?

I have a game, and everything works perfectly, until I try to build it, because apparently, I can’t use the editor class HandleUtility.DistancePointLine() in my game.
I find it really strange that Unity didn’t include a DistancePointLine() function for a non-Editor class, at least as far as I am aware of, because now I simply can’t build my game.
Is there some function in C# that CAN be used for the build?

Thank You.

1 Answer

1

I know it’s been seven years, but you can use the code from:

No, you can't use that code in your production. Please read the license that is attached to the reference repository. [The "for reference only" license][1] does not allow you to use this code anywhere else, it's only there for reference. Note that you can take "the idea" and create your own method based on that. Of course technically it wouldn't make a huge difference in this case, however a lot people seem to not looking up the license. So your advice is misleading. [1]: https://unity3d.com/legal/licenses/Unity_Reference_Only_License