Search code examples
c#visual-studiounity-game-enginetransformgeospatial

C# library similar to Unity's Transform component


I use Unity to make a number of small engineering specific applications, because I find the Transform component and the Quaternion and Vector3 classes have some great native functionality that makes spatial work much easier.

I need to step outside the Unity editor/engine for some projects, and was wondering if there is a C# library with similar functionality that is highly portable that I could drop into a VS project?


Solution

  • You may find Unity's source code implementation for the classes / structs you mentioned here:

    Vector3: https://github.com/Unity-Technologies/UnityCsReference/blob/master/Runtime/Export/Math/Vector3.cs

    Quaternion: https://github.com/Unity-Technologies/UnityCsReference/blob/master/Runtime/Export/Math/Quaternion.cs

    Transform - related stuff: https://github.com/Unity-Technologies/UnityCsReference/tree/master/Runtime/Transform/ScriptBindings

    Perhaps you can use this code as reference or even copy it in your project. Mind you, I do not know what the licence permits or not.