Download

How to know the inherited parent class of the .cpp .h file in Visual Studio?

I’m getting into Gameplay Ability System and want to understand how it’s realized. In Action RPG by Epic there is classes in Visual Studio that isn’t visible in Unreal Editor. I want to create it my self in my own project. So how do I know the parent class of this class in Visual Studio? I tried Class Diagram, gave me an error.

I’d like to help, but I’m not really sure what you’re asking.

Yes, in a C++ project there are types that aren’t going to be visible to the Unreal Editor. There are some types of code that it’s not practical or possible to expose to the Editor so it’s just regular C++.

Are you asking how you decide what class you should parent a new class that you’re writing from? or are you asking about how do you know what the parent type is for an existing class that you’re just looking at?

​​​​​The parent type of an existing class

Generally the only way to know that is to look at the actual declaration of the class. This should be in a header file somewhere. I believe in Visual Studio, the F12 key should jump you to a declaration if you highlight the name of the type you want to find.

It’s possible that there are other tools in Visual Studio (sorry yours isn’t working), but I don’t generally use them. I prefer to just look at the source code directly.