deserializing a matrix4x4 as part of a structure

i have a structure like this:

    [System.Serializable]
    public struct partData
    {
        public Vector3[] vertices;
        public int[] triangles;
        public Matrix4x4 worldMatrix;
        public List<Vector2> uvs;
    }

if i try to populate it the matrix is all 0’s, so i boiled it down to this:

    JsonUtility.FromJson<partData>("{\"worldMatrix\":{\"m00\":4.641731886634304e-7,\"m10\":-1.5472438025243562e-7,\"m20\":0.9999996905511916,\"m30\":0,\"m01\":0.9999996905511916,\"m11\":4.641731886634304e-7,\"m21\":-1.5472438025243562e-7,\"m31\":0,\"m02\":-1.5472438025243562e-7,\"m12\":0.9999996905511916,\"m22\":4.641731886634304e-7,\"m32\":0,\"m03\":0.0000030839724787234957,\"m13\":-16.875003990971535,\"m23\":-0.0000039840041483607536,\"m33\":1}}")

which also fails the same way. if i run this:

    JsonUtility.FromJson<Matrix4x4>("{\"m00\":4.641731886634304e-7,\"m10\":-1.5472438025243562e-7,\"m20\":0.9999996905511916,\"m30\":0,\"m01\":0.9999996905511916,\"m11\":4.641731886634304e-7,\"m21\":-1.5472438025243562e-7,\"m31\":0,\"m02\":-1.5472438025243562e-7,\"m12\":0.9999996905511916,\"m22\":4.641731886634304e-7,\"m32\":0,\"m03\":0.0000030839724787234957,\"m13\":-16.875003990971535,\"m23\":-0.0000039840041483607536,\"m33\":1}")

it load the matrix correctly but as part of another structure it does not, any idea on why this might be and what i can do.

in the short term i can calculate the vector points using the matrix on the data source before sending it to unity, but this is suboptimal, i’d rather have the world matrix as part of the data object itself.

I’m not really sure why, but it seems like when it’s part of another struct, for some reason JsonUtility is renaming the fields from “m00” etc… to “e00” etc… I did this test:

        Matrix4x4 m4 = new Matrix4x4();
        m4.m00 = 4f;
        Debug.Log(JsonUtility.ToJson(m4));
        partData p = new partData();
        p.worldMatrix.m00 = 20f;
        Debug.Log(JsonUtility.ToJson(p));

And this is what printed out:

First one, not part of the partData struct:
{“m00”:4.0,“m10”:0.0,“m20”:0.0,“m30”:0.0,“m01”:0.0,“m11”:0.0,“m21”:0.0,“m31”:0.0,“m02”:0.0,“m12”:0.0,“m22”:0.0,“m32”:0.0,“m03”:0.0,“m13”:0.0,“m23”:0.0,“m33”:0.0}

Second one:
{“vertices”:[ ],“triangles”:[ ],“worldMatrix”:{“e00”:20.0,“e01”:0.0,“e02”:0.0,“e03”:0.0,“e10”:0.0,“e11”:0.0,“e12”:0.0,“e13”:0.0,“e20”:0.0,“e21”:0.0,“e22”:0.0,“e23”:0.0,“e30”:0.0,“e31”:0.0,“e32”:0.0,“e33”:0.0},“uvs”:[ ]}

I wonder if when deserializing it is expecting the “e” names as well?

fraid not, i replaced the m’s with e’s it still did not deserialize.