Skip to content

Commit

Permalink
[ue] Fix compatibility with UE 4.27
Browse files Browse the repository at this point in the history
  • Loading branch information
badlogic committed Jan 22, 2025
1 parent 811ec28 commit 816f0d9
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,11 @@ void USpineAtlasAsset::PostInitProperties() {

void USpineAtlasAsset::Serialize(FArchive &Ar) {
Super::Serialize(Ar);
if (Ar.IsLoading() && Ar.UEVer() < VER_UE4_ASSET_IMPORT_DATA_AS_JSON &&
!importData)
#if ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION <= 27
if (Ar.IsLoading() && Ar.UE4Ver() < VER_UE4_ASSET_IMPORT_DATA_AS_JSON && !importData)
#else
if (Ar.IsLoading() && Ar.UEVer() < VER_UE4_ASSET_IMPORT_DATA_AS_JSON && !importData)
#endif
importData = NewObject<UAssetImportData>(this, TEXT("AssetImportData"));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,11 @@ void USpineSkeletonDataAsset::GetAssetRegistryTags(

void USpineSkeletonDataAsset::Serialize(FArchive &Ar) {
Super::Serialize(Ar);
if (Ar.IsLoading() && Ar.UEVer() < VER_UE4_ASSET_IMPORT_DATA_AS_JSON &&
!importData)
#if ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION <= 27
if (Ar.IsLoading() && Ar.UE4Ver() < VER_UE4_ASSET_IMPORT_DATA_AS_JSON && !importData)
#else
if (Ar.IsLoading() && Ar.UEVer() < VER_UE4_ASSET_IMPORT_DATA_AS_JSON && !importData)
#endif
importData = NewObject<UAssetImportData>(this, TEXT("AssetImportData"));
LoadInfo();
}
Expand Down

0 comments on commit 816f0d9

Please sign in to comment.