Announcement

Collapse
No announcement yet.

Help With Pointers

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

    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 I`m having now is that im not sure what to replace this with as I`m new to C++ and using it in Unreal is the first time im programming in C++.
    This is the code i needed help with:

    http://gyazo.com/456dbaedcaf0bba4d4f8cce4a1be13fa

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


    #2
    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;

    Comment


      #3
      Originally posted by Defused View Post
      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 I`m having now is that im not sure what to replace this with as I`m new to C++ and using it in Unreal is the first time im programming in C++.
      This is the code i needed help with:

      http://gyazo.com/456dbaedcaf0bba4d4f8cce4a1be13fa

      any help would be amazing, hope everyone has a great Christmas
      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.

      http://www.amazon.com/Primer-5th-Edi.../dp/0321714113
      Twitter: @InfectedFPS
      Twitch: InfectedFPS (Occasionally stream some work)

      Comment


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

        Comment

        Working...
        X