ACharacter::Mesh is...Private?

Hey guys, brushing up on my C++ here. I’ve been in Blueprint way too long.

When creating a character do I really need to create a new skeletal mesh component? ACharacter::Mesh is private and cannot be accessed from child classes (except through bp) which seems silly to me. I guess I could change the header declaration to protected or public but just trying to get the general practice. What approach do usually take? It seems redundant to create another mesh when there already is one. That’s a waste of memory.

For clarity, I’m just doing a small project almost exclusively in C++ to get used to it. Again, I know I CAN create a second skeletal mesh and work with that but I don’t want to do it that way if I can avoid it.


1 Like

Use GetMesh() and you can access it. Most if not all private components like that have accessor functions.

1 Like