Announcement

Collapse
No announcement yet.

What is the c++ equivalent to BP's Class Reference?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    What is the c++ equivalent to BP's Class Reference?

    I am converting BP to C++ and the variable in question is a Class Reference;

    What is the C++ equivalent?

    TSubclassOf Type* -> StaticClass() Type*

    I know I am overthinking this.

    Click image for larger version

Name:	Screen Shot 2020-05-29 at 8.35.42 AM.png
Views:	37
Size:	38.0 KB
ID:	1768547
    Last edited by MasterHowerton; 05-29-2020, 11:41 AM.

    #2
    Is this what you're looking for? So if for example, I wanted it for APawn, it would be APawn::StaticClass()
    Last edited by Ed.Kaminski; 05-29-2020, 02:14 AM.

    Comment


      #3
      TSubclassOf<> is (as the name implies) for sub-classes. Typically you would use this to reference Blueprint assets, or pass classes around the codebase. It can be nicely exposed through reflection.

      SomeType::StaticClass() is useful when you just want to reference the native class.

      Comment

      Working...
      X