Packaging Unreal project for release

Hi Jedd

SetActorLabel is only available in development but not for the final release. It jams building the package.

Is it possible if you use SetActorLabel in the new version to wrap it as follows:

#if !UE_BUILD_SHIPPING
MeshInstance->SetActorLabel(FString::Printf(TEXT("%s - %s"), *ASpeckleUnrealMesh::StaticClass()->GetName(), *ObjId));
#endif

Thanks,
Dimitrios

1 Like

Thanks for catching this one, I’ll create a fix ASAP.

Just merged the fix Fixed issue with non-editor builds caused by call to SetActorLabel by JR-Morgan · Pull Request #27 · specklesystems/speckle-unreal · GitHub

Thanks, I’ll take extra care to test standalone builds more frequently.

Better to use this

	#if !UE_BUILD_SHIPPING && !UE_BUILD_DEBUG && !UE_BUILD_DEVELOPMENT 
	MeshInstance->SetActorLabel(FString::Printf(TEXT("%s - %s"), *ASpeckleUnrealMesh::StaticClass()->GetName(), *ObjId));
	#endif

I’m not sure it is,
Looking at Actor.h, the function is only avaiable #if WITH_EDITOR
(see line 1911 and 2009 of Actor.h)

So it makes sense to me to use that directive instead of relying on the build types being !WITH_EDITOR.