Announcement

Collapse
No announcement yet.

Subobject pointers not compatible?

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

    Subobject pointers not compatible?

    I have been getting the following error:
    "Subobject_Pointers_Must_Be_Compatible"
    The problem is that I have no idea of what is ment with that. In addition, the error doesn't actually refer to any line in my code, so I have litterally no idea about what line is causing the error. Anybody know what could have gone wrong? Thank you in advance!
    Last edited by Borzi; 06-23-2014, 08:53 AM.

    #2
    You're going to have to provide a few more details. Is this a blueprint only project or a C++ project? When exactly is the error emitted? Have you changed the component types on any actors lately?
    Contact: enlight in #unrealengine IRC channel on Freenode, or @macagonator on Twitter

    Comment


      #3
      Okay sure. It is C++ only. Just as I read this message, I actually mannaged to find and narrow down the components that caused the error:

      Code:
      //Collision Component for when the player Crouches
      	UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = Collision)
      		TSubobjectPtr < class UCapsuleComponent > CrouchCollisionComponent;
      
      	//Collision Component to check for player headroom
      	UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = Collision)
      		TSubobjectPtr < class UBoxComponent > UncrouchComponent;
      Does this help you?

      Comment


        #4
        How and where are you initializing these components? If in code, please paste the relevant snippets.
        Contact: enlight in #unrealengine IRC channel on Freenode, or @macagonator on Twitter

        Comment


          #5
          Okay thanks I found what the problem was. I put "UncrouchComponent = PCIP.CreateDefaultSubobject<UCapsuleComponent>(this, TEXT("UncrouchComponent"));" instead of "UncrouchComponent = PCIP.CreateDefaultSubobject<UBoxComponent>(this, TEXT("UncrouchComponent"));".

          Comment

          Working...
          X