This code passes the build when compiled using the windows editor (Visual Studio), but fails when compiled using the mac editor (XCode). Adding ENGINE_API to struct FStreamingLevelsToConsider and exposing it resolves the error.
Add the following code to build with the Mac Editor configuration
#include "MyClass.h" #include "Engine/LevelStreaming.h" MyClass::MyClass() { ULevelStreaming *streaming = nullptr; UWorld *world = nullptr; world->IsStreamingLevelBeingConsidered(streaming); }
The following errors are output at this time
[1/3] Compile [Intel] MyClass.cpp [2/3] Link [Intel] UnrealEditor-MyProject3.dylib Undefined symbols for architecture x86_64: "FStreamingLevelsToConsider::Contains(ULevelStreaming*) const", referenced from: MyClass::MyClass() in MyClass.cpp.o
There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-190011 in the post.
0 |
Component | UE - World Creation - Worldbuilding Tools |
---|---|
Affects Versions | 5.2 |
Target Fix | 5.4 |
Created | Jun 30, 2023 |
---|---|
Resolved | Sep 19, 2023 |
Updated | Oct 20, 2023 |