- You shall avoid asset references in your c++ code!
- If the needed mesh is set in a member variable and set in the editor, it is not accessible in the constructor, but in BeginPlay.
- If the constructor does not add anything like a mesh, you can’t move the object in the editor and you can’t even see it.
- EVERY example I see, including the Shooter template, add meshes in the constructor.
- Should I ask questions like this in the “Tutorial” or “Getting started” section? Or is it ok to ask such basic questions here?
I don’t get it. How do I do it correctly?
Of course I want to set the mesh to use in the Blueprint.
Then I can’t use that mesh in the constructor.
Then I can’t see/move the object in the World/Editor.
What am I missing?
Is there a method I don’t know of? I checked AActor and saw methods like “PostActorCreated” but I would be guessing. Is that the one to use?