29-09-2023, 06:29 AM
(This post was last modified: 29-09-2023, 06:55 AM by josemendez.)
Hi,
Could reproduce this.
"extrudedMesh" is explicitly marked as non-serialized, since it's created entirely from scratch when you create the renderer and destroyed afterwards and there's no need to store it anywhere. However, the script serializing it is not ObiRopeExtrudedRenderer but Unity's MeshFilter, which the mesh is assigned to in order to be rendered. You can check this by looking at the MeshFilter's referenced file id, should be 1380844300 as per the scene snippet you shared, something like:
Seems like the MeshFilter component will serialize the mesh assigned to it in case it's not an asset stored in disk, even if the script creating it holds a non-serialized reference to it. As far as I know we have no way to modify this behavior, as MeshFilter is a built-in Unity component.
kind regards,
Could reproduce this.
"extrudedMesh" is explicitly marked as non-serialized, since it's created entirely from scratch when you create the renderer and destroyed afterwards and there's no need to store it anywhere. However, the script serializing it is not ObiRopeExtrudedRenderer but Unity's MeshFilter, which the mesh is assigned to in order to be rendered. You can check this by looking at the MeshFilter's referenced file id, should be 1380844300 as per the scene snippet you shared, something like:
Quote:MeshFilter:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: anyNumber}
m_Mesh: {fileID: 1380844300}
Seems like the MeshFilter component will serialize the mesh assigned to it in case it's not an asset stored in disk, even if the script creating it holds a non-serialized reference to it. As far as I know we have no way to modify this behavior, as MeshFilter is a built-in Unity component.
kind regards,