Attaching C++ class to an actor object

Greetings, i’m a new here, so i beforehand excuse for a such a lame question…
But…how can i attach a certain class (written in C++) to an actor (let’s say car)?
without using blueprints, i’m a code geek, i prefer to code :slight_smile:

Basically, you want to do it the other way around. Attach the mesh objects to the code.

There are a few ways to do it. I find it easier to use Blueprints to attach in game objects to because it simplifies the initialization of those components. You can do it purely in C++, but I recommend you make your C++ class Blue-printable and assign your mesh objects to it in the Blueprint Editor. It’s just easier. You can still do your game-play code for it in it’s C++ functions you don’t need to use the event graph if you’d rather do that all in code.

thank you so much, now everything clear :slight_smile: