-
Notifications
You must be signed in to change notification settings - Fork 447
Add built-in serialization for UnityEngine.Pose
#2675
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@michalChrobot |
Hi, thanks for pinging. We will try to find some time to check it out next week |
Hi @PitouGames , We will look into the possibility of making this a default type. However, you can always create your own Custom Serializers for various types that will work for RPCs, INetworkSerializable, and NetworkVariables. As an example, adding Pose would look something like this:
You would just need to invoke |
Thank you to both of you for the reply. Yes Noel, that is what I meant when I wrote:
Thank you for the "official" sample code. But it's developer work that can be avoided since Pose is an Engine type, just as Vector3 or Quaternion 😉 |
Is your feature request related to a problem? Please describe.
Unity provide a primitive struct called Pose, which is a composition of a
Vector3
and aQuaternion
. This type is not very known, but very usefull, for instance in a single list of waypoints that also need to store their rotation.This type is not listed in the documentation: https://docs-multiplayer.unity3d.com/netcode/current/advanced-topics/serialization/unity-primitives/, and doesn't work if used in an Rpc or NetworkVariable.
Describe the solution you'd like
Add a default serializer for
UnityEngine.Pose
.Describe alternatives you've considered
Today, users have to implement their own serializer or send Vector3 and Quaterion separately.
The text was updated successfully, but these errors were encountered: