- Home /
Polybrush bake vertex streams not working, resets after restart
I'm trying to bake vertex colors to a mesh using Tools > Polybrush > Bake Vertex Streams and it seems to be working fine, but when I restart the editor all changes are lost.
And when I press play while there's still a "Z_Additional Vertex Streams" component on the gameobject It either gives me the following error or it just disappears:
Mesh.colors is out of bounds. The supplied array needs to be the same size as the Mesh.vertices array.
UnityEngine.Mesh:set_colors32(Color32[])
Polybrush.z_Mesh:ApplyAttributesToUnityMesh(Mesh, z_MeshChannel) (at Assets/Plugins/ProCore/Polybrush/Code/Scripts/Type/z_Mesh.cs:163)
Polybrush.z_EditableObject:ApplyMeshAttributes(z_MeshChannel) (at Assets/Plugins/ProCore/Polybrush/Code/Editor/Classes/z_EditableObject.cs:444)
Polybrush.z_BrushModePaint:OnBrushMove(z_BrushTarget, z_BrushSettings) (at Assets/Plugins/ProCore/Polybrush/Code/Editor/Brush Modes/z_BrushModePaint.cs:298)
Am I doing something wrong?
Unity version? I have not had a problem baking vertex streams in 2019.1, polybrush is still in beta and will have a stable v1 release later in the 2019 release cycle and be accessible in the package manger.
The error is saying that you are passing more colors to your mesh than it has vertices, are you making changes to your mesh while painting vertex streams, this may be causing the issue.
Unity version 2018.3.7f1. All I'm doing is painting the vertices and pressing play.
Answer by Goldenvale · Apr 29, 2019 at 07:49 PM
I figured out the problem. I had Static Batching checked in the player settings which caused problems like @ParadoxSolutions said.