You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .docs/Fixed64_Serialization.md
+4-3Lines changed: 4 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,13 +2,13 @@
2
2
3
3
## Summary
4
4
5
-
`Fixed64` has a Unity-compatible serialized shape. Unity can persist non-zero `Fixed64`, `Vector2d`, and `Vector3d` authoring values through ScriptableObject assets and prefabs, including nested structs and list elements.
5
+
`Fixed64` has a Unity-compatible serialized shape. Unity can persist non-zero `Fixed64`, `Vector2d`, `Vector3d`, and `Vector4d` authoring values through ScriptableObject assets and prefabs, including nested structs and list elements.
6
6
7
7
Unity's field serialization rules state: Unity serializes fields, but it does not persist `readonly` fields. Hence, `Fixed64` cannot persist its payload as `public readonly long m_rawValue` since Unity had no durable payload to write. Inspector edits could affect the live object, then reload as zero from asset or prefab YAML.
8
8
9
9
The fix was to keep FixedMathSharp engine-agnostic by using a normal public `long` field instead of Unity attributes or Unity-specific wrapper types.
0 commit comments