Hi thanks for the reply. I am not trying to initialize a new mesh, I have a preexisting mesh within the blueprint that I want to have access to in code.
I have worked around the problem by calling GetComponentsByClass and then looping through the results to find the one I require, but this seems inefficient. I would much prefer if the reference was serialized out to the editor.
So if you add the static mesh in blueprints and you’re trying to access it by c++ then the only way to get that is to go through all of the static mesh components using GetComponentsByClass and checking the name. The thing is you can do that in BeginPlay and it will only happen once, so it’s fine.
Eventually you could use GetcomponentByTag and you would just tag the component you want, but that should iterate through them, so it should be same thing.