Create component of subclass
I want my player character to have a function that takes a TSubclassOf variable. This function should create a component of the exact class the TSubclassOf variable is, but I cant figure out a way to do this. My question is: Is it possible to create a component based on the class of a TSubclassOf variable and if yes how?
asked Oct 24 '15 at 05:55 PM in C++ Programming
You mean UClass* (TSubclassOf is just UClass* template that limits class selection in editor to specific relation)
RegisterComponent takes outer Actor that you specified in NewObject in first argument, so if we inside Actor we simply use "this"
Follow this question
Once you sign in you will be able to subscribe for any updates here