GetVertexColorData() not working on packaged build?
Here's what I want to achieve: I have a flat mesh where I want to instanced a static mesh on each vertex. Additionally, I want to use the vertex color of this mesh to handle the rotation and scale of the instance.
All of this is working fine in the editor. Here's what it looks like:
My problem is that I am not able to properly get the vertex color in a packaged build (or when launching it). I am using a C++ Blueprint library to do this. Extending from the function shared by Rama (wiki), I have the following code:
Is the GetVertexColorData() function not working outside the editor? Is there an other/better way to get the vertex color in blueprint? By the way, the position is still correct but the vertex color is completely black. I have been able to confirm this by doing a Print.
I would appreciate any help on this!
asked Feb 02 '17 at 02:57 PM in Packaging & Deployment
From looking up the GetVertexColorData function in StaticMesh.cpp, it looks like the entire body of the function, other than the first line which sets it to an empty value, is contained in "#if WITH_EDITOR" meaning that it will only execute in the editor.
From looking up alternatives, I came across this old archived post that may be able to provide some information. It looks like there are no plans to expose this information to blueprint but you may be able to access it in C++ by directly accessing a Static Mesh's FColorVertexBuffer variable.
answered Feb 07 '17 at 08:00 PM
Matthew J ♦♦ STAFF
Follow this question
Once you sign in you will be able to subscribe for any updates here