Which is better to use a child class or a blue print for the following example. I have a actor that highlights when the player focus on it.I want to create buttons and switches that inherit from the actor. Should i create a child class from the actor each time for different types of intractable actors or should i create a child blueprint class from the intractable actor blueprint.
Which is better and why?
Here is a diagram to illustrate kind of what i mean. Sorry for bad English.
There is no definitive answer to this, but here is the general consent on when to use what: You use C++ classes as the “foundation”. So if you have functionality that is used by many things you probably want to write that in C++. You use Blueprint for things that are very specific. If you create a button that makes a sound, but all the others do not, then it would be “the right way” to make a C++ class out of everything that all have in common (maybe two functions for turning it on/off) and put the specifics in a blueprint class (the sound that it makes, the mesh that it has, etc.).
So if you are going to have many different buttons that do different things you would make a blueprint for each based on your “button” C++ class.
Thanks for the explanation and reasoning.
If the answers satisfies you please mark it as the correct answer so other people know this question is resolved.