# Mesh access in constructor

**URL:** <https://forums.unrealengine.com/t/mesh-access-in-constructor/1888232>\
**Category:** C++\
**Tags:** beginplay, constructors, unreal-engine, editor, staticmesh, question\
**Created:** [June 4, 2024, 12:14am UTC](https://forums.unrealengine.com/t/mesh-access-in-constructor/1888232 "2024-06-04T00:14:41Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![BugSwat](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@BugSwat](https://forums.unrealengine.com/u/BugSwat)\
**Post date:** [June 4, 2024, 12:14am UTC](https://forums.unrealengine.com/t/mesh-access-in-constructor/1888232/1 "2024-06-04T00:14:41Z")

</div>

1. You shall avoid asset references in your c++ code!
2. 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.
3. 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.
4. EVERY example I see, including the Shooter template, add meshes in the constructor.
5. 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?
