Hello I was doing the following steps:
class MY_API MyMenu
{
public:
void HandleMenu( class ArtsHUD* in_HUD );
};
void MyMenu::HandleMenu
(
class ArtsHUD* in_HUD
)
{
FLinearColor color = FLinearColor::White;
in_rtsHUD->DrawRect( color, 100.0f, 100.0f, 100.0f, 100.0f );
}
Everthing works fine, project is OK. If I delete Binaries and Intermediate stuff, The UEditor is able to recover everthing from the myproject.uproject file. I am using git for source controll only the significant files.
But if I turn the code into how DrawRect is implemented internally in canvas.cpp (to make use of rotation):
void MyMenu::HandleMenu
(
class ArtsHUD* in_HUD
)
{
FLinearColor color = FLinearColor::Blue;
color.A = 0.3f;
//in_rtsHUD->DrawRect( color, 100.0f, 100.0f, 100.0f, 100.0f );
FCanvasTileItem TileItem( FVector2D( 100.0f, 100.0f ),
GWhiteTexture, FVector2D( 100.0f, 100.0f ), color );
TileItem.BlendMode = SE_BLEND_Translucent;
TileItem.Rotation = FRotator( .0f, 90.0f, .0f );
in_rtsHUD->Canvas->DrawItem( TileItem );
}
After a long coding session … I was always using “DebugGame” configuration, everthing works fine…
But back in UEditor, suddenly I am facing a bunch of build problems. UEditor says, it cannot compile. The Unreal Project looks to be completly ruined, all my work for the trash? It took me hours to figure out whats the particular matter.
The causing issue is an unresolved external of GWhiteTexture if I compile with “DebugGame Editor”:
MyMenu.cpp.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) class FTexture * GWhiteTexture" (__imp_?GWhiteTexture@@3PEAVFTexture@@EA)
I didn’t realize that “DebugGame” and “DebugGame Editor”, somehow, has different dependencies. Is this a bug?
Does someone has an idea how to fix this glitch ?