Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[UE] Warning with GetAssetRegistryTags #2728

Open
mupchurch777 opened this issue Jan 7, 2025 · 0 comments
Open

[UE] Warning with GetAssetRegistryTags #2728

mupchurch777 opened this issue Jan 7, 2025 · 0 comments
Assignees

Comments

@mupchurch777
Copy link

Unreal 5.4 and above have listed GetAssetRegistryTags to be deprecated with a new version. I already fixed this locally but I don't have access to create a PR.

Note: This is in SpineSkeletonDataAsset.h/.cpp

#if ((ENGINE_MAJOR_VERSION >= 5) && (ENGINE_MINOR_VERSION >= 4))
void
USpineSkeletonDataAsset::GetAssetRegistryTags(FAssetRegistryTagsContext Context) const
{
	if (importData)
	{
		Context.AddTag(FAssetRegistryTag(SourceFileTagName(), importData->GetSourceData().ToJson(), FAssetRegistryTag::TT_Hidden));
	}
	Super::GetAssetRegistryTags(Context);
}
#else
void USpineSkeletonDataAsset::GetAssetRegistryTags(
		TArray<FAssetRegistryTag> &OutTags) const {
	if (importData) {
		OutTags.Add(FAssetRegistryTag(SourceFileTagName(),
									  importData->GetSourceData().ToJson(),
									  FAssetRegistryTag::TT_Hidden));
	}

	Super::GetAssetRegistryTags(OutTags);
}
#endif

(the header file needs to be changed accordingly as well).  This removed the warning and fixes the issue for future Unreal Releases
@badlogic badlogic self-assigned this Jan 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants