ue/plugins/vmc4ue/VMC4UEBoneMappingAssetFactory.cpp.patch

26 lines
1.1 KiB
Diff
Raw Normal View History

2024-06-03 14:47:02 +00:00
--- ./VMC4UE/Source/VMC4UEEd/Source/VMC4UEBoneMappingAssetFactory.cpp
+++ ./VMC4UEBoneMappingAssetFactory.cpp
@@ -5,6 +5,8 @@
#include "../../VMC4UE/Include/VMC4UEStreamingData.h"
#include "Dom/JsonObject.h"
#include "JsonObjectConverter.h"
+#include "UObject/ConstructorHelpers.h"
+#include "UObject/UObjectGlobals.h"
UVMC4UEBoneMappingAssetFactory::UVMC4UEBoneMappingAssetFactory(const FObjectInitializer &ObjectInitializer)
: Super(ObjectInitializer)
@@ -26,11 +28,12 @@
return UVMC4UEVRMMapping::StaticClass();
}
+
UObject *UVMC4UEBoneMappingAssetFactory::FactoryCreateText(UClass *InClass, UObject *InParent, FName InName, EObjectFlags Flags, UObject *Context, const TCHAR *Type, const TCHAR *&Buffer, const TCHAR *BuferEnd, FFeedbackContext *Warn)
{
FString TextData = FString(Buffer);
- UVMC4UEVRMMapping *NewAsset = CastChecked<UVMC4UEVRMMapping>(StaticConstructObject_Internal(InClass, InParent, InName, Flags));
+ UVMC4UEVRMMapping* NewAsset = NewObject<UVMC4UEVRMMapping>(InParent, InClass, InName, Flags);
if (!IsValid(NewAsset))
{
return nullptr;