Download

TSubobjectPtr<class UPhysicsHandleComponent> RHandPhys; Broken in 4.5?


RHandPhys = PCIP.CreateDefaultSubobject<UPhysicsHandleComponent>(this, TEXT("PhysicsHandleComponent1"));


This line works fine in my constructor in 4.4, but does not work in 4.5.
When I try to compile I get this



1>f:\gitunreal\unrealengine\engine\source\runtime\coreuobject\public\uobject\UObjectGlobals.h(555): error C2440: 'initializing' : cannot convert from 'UPhysicsHandleComponent *' to 'UObject *'
1>          Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
1>          f:\gitunreal\unrealengine\engine\source\runtime\coreuobject\public\uobject\UObjectGlobals.h(553) : while compiling class template member function 'TSubobjectPtrConstructor<UPhysicsHandleComponent>::TSubobjectPtrConstructor(SubobjectType *)'
1>          with
1>          
1>              SubobjectType=UPhysicsHandleComponent
1>          ]
1>          f:\gitunreal\unrealengine\engine\source\runtime\coreuobject\public\uobject\UObjectGlobals.h(701) : see reference to function template instantiation 'TSubobjectPtrConstructor<UPhysicsHandleComponent>::TSubobjectPtrConstructor(SubobjectType *)' being compiled
1>          with
1>          
1>              SubobjectType=UPhysicsHandleComponent
1>          ]
1>          F:\GitUnreal\UnrealProjects\ThirdP\Source\ThirdP\Private\ThirdPCharacter.cpp(42) : see reference to class template instantiation 'TSubobjectPtrConstructor<UPhysicsHandleComponent>' being compiled
1>f:\gitunreal\unrealengine\engine\source\runtime\coreuobject\public\uobject\UObjectGlobals.h(555): error C2439: 'TSubobjectPtrConstructor<UPhysicsHandleComponent>::Object' : member could not be initialized
1>          f:\gitunreal\unrealengine\engine\source\runtime\coreuobject\public\uobject\UObjectGlobals.h(551) : see declaration of 'TSubobjectPtrConstructor<UPhysicsHandleComponent>::Object'

Does anyone know what is going on here?

EDIT:

Woops

I guess I just need this now
#include “PhysicsEngine/PhysicsHandleComponent.h”