TSubobjectPtr not working!

Hi!
I’ve been learning UE4 and am doing tutorials to get into C++.
Something which they all do is create TSubobjectPtr properties in their classes, but it isn’t working for me. VS keeps giving me this message:
TSubobjectPtr is deprecated and Expecting type identifier.

If it’s deprecated, what do I use instead?
Also, why can’t VS identify it?
I’m completely stuck here

We don’t use TSubobjectPtr anymore, just regular C++ pointers like so:



TSubobjectptr<AMyClass> MyClass;


Becomes:



AMyClass* TheClass;


Welcome to the forums!

Instead of TSubobjectPtr<TheType> VarName; it should just be TheType* VarName; (probably as a UPROPERTY). See this answer hub topic: How to update TSubobjectPtr to the current v4.6 changes

Thanks both of you! This really helps!
:smiley: