Need help understanding a compile error

Hi, I’m trying to use this function for experimental purposes but I’m getting a compilation error

error LNK2019 unresolved external symbol error “public: bool __cdecl UStreamableRenderAsset::IsPendingStreamingRequestLocked(void)const”…

I have a UTexture and I’m trying to call this function:

UTexture* t = ..;
if(t->IsPendingStreamingRequestLocked()) { }

I have include “Engine/Texture.h” included.

Any ideas ? thank you.

https://docs.unrealengine.com/4.27/en-US/API/Runtime/Engine/Engine/UStreamableRenderAsset/

include “Engine/StreamableRenderAsset.h”

I already have it included. could it be that I need to add some dependency module in build.cs ?
Thanks.

No, the module is Engine, you should already have it in your project. And including Texture.h is already enough as it inherits from StreamableRenderAsset.

Upon testing and digging up it myself, the issue seems to be that the methods are in a class that uses the MINIMAL_API macro, therefore the symbols won’t be exported. The functions would have to be explicitly marked with a macro (when MININAL_API is used) to be used outside of the module they are in.

You’d have to do something like either modify the class or implement your own version of it to gain access to the funtion outside of its own module.

1 Like

That makes perfect sense, thank you for looking into it I appreciate it.