Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Office Holiday

Epic Games' offices will be on holiday from June 22nd to July 7th. During this period support will be limited. Our offices will reopen on Monday, July 8th. 

unresolved external, unreal project inoperable

Hello I was doing the following steps:

 class MY_API MyMenu
     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 ?

Product Version: UE 4.8
more ▼

asked Jul 20 '15 at 05:14 AM in C++ Programming

avatar image

31 4 6 8

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

I wouldn't expect the editor and game to have the same set of dependencies however what you're saying seems the opposite to what I'd expect (the standalone game to include less).

Personally I've put textures for general C++ access in a singleton texture manager. They are the accessible from different parts of code.

The textures themselves are embedded in game actors (for instance my derived from AGameMode class). Code is attached - you are welcome to use it but use at your own risk.

In class MyGameMode : public AGameMode....

     UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Data)
         TArray<FTextureCollection> TextureCollections;
 TextureCollectionManager *mp_TextureCollections = 0;

In the CPP (MyGameMode::InitGame)

 mp_TextureCollections = new TextureCollectionManager;
         for (auto &collection : TextureCollections)
             if (!collection.CollectionName.IsEmpty())

And access (excuse the const_cast) by CollectionName:TextureName

 pSnakeHead = const_cast<UTexture*>(TextureCollectionManager::GetInstance().GetTexture(_T("Snake:Head")));

Probably not very helpful, but here if you want it.

link text link text

more ▼

answered Jul 22 '15 at 08:07 PM

avatar image

1.3k 60 65 269

avatar image caribes Jul 23 '15 at 12:22 AM

Thanks for the reply. :) OK, the idea is to use a workaround by substitution of "GWhiteTexture" from the engine resource with an own Texture object been hold somehow in an own resource manager. Sooner or later I have to implement a resource manager. Thanks for the code sample!

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question