Help With Pointers

Hey everyone

Have a question about TSubObjectPtr, in the documentation of 4.6 changes it says “We’re getting rid of TSubobjectPtr. It was confusing and weird. Just use normal pointers to your sub-objects now!”

The problem Im having now is that im not sure what to replace this with as Im new to C++ and using it in Unreal is the first time im programming in C++.
This is the code i needed help with:

any help would be amazing, hope everyone has a great Christmas :slight_smile:

It is just saying not to use TSubObjectPtr anymore, use raw pointers instead. So, in the example you pointed to, it would be:

UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = Collision)
UBoxComponent *CollisionComp;

If you’re new to C++ I would highly recommend picking up a book on it (I personally recommend C++ Primer for people just starting out with C++). It’ll help you in the long run. :slight_smile:

Thanks both of you, and i will definitely look in to getting some books on C++ after the expensive Christmas time has past.