Creating class variable
How to get that done in code?
asked Oct 23 '14 at 03:55 PM in C++ Programming
I realize this is an older post, but what you're looking for is, I believe, TSubclassOf. So to declare your array in code, it would look like:
(assuming your array is an array of actor classes. If not, replace AActor with whatever)
In the header file for your class (the .h file) you want to add a declaration of the variable. As an example, the declaration of "bool bCanRun" defines a boolean variable named "bCanRun". Then in the source code file (the .cpp) you can set a value to the variable such as "bCanRun = true;".
answered Oct 23 '14 at 04:11 PM
Hello, sorry for bumping up that old thread. But can you explain this a little more? What exactly is the code for a Class Variable? And how do I make it public to blueprint. As the author of this thread, I want to create something like a static variable in C++. (So the violet variables in BP).
answered Aug 24 '16 at 09:32 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here