As I work with Unity in a multiplayer context it has become clear to me that life would be much easier if Vector3, Vector2, Quaternion, and MathF lived in a library that is reusable to both client and server.
I’ve had to recreate these classes to mirror server and client state – and given the effort this has required, I wonder why Unity doesn’t
a) make the complete source available for these classes or
b) make them available closed source via a common assembly.
I’m curious to know what the design motivation was for the Unity team.
You can use the UnityEngine.dll (found in the editors installation folder) to access most Unity classes (including vectors, mathf and quaternions) on your non-unity server application.
I did a poor job of actually describing what I think is missing. After reviewing the functions I needed, most of what I could not find exists in transform.cs, and appears to call into compiled code. I think there would be great value in having these classes exist within a library.
Oh, getting access to the C++ side of Unity is a frequent topic. Unity provides access under special licensing, the cost of which I haven’t seen disclosed publicly (which means not cheap).