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"

Earlier bug that is closed when you perform GetWidth or GetHeight

As: https://answers.unrealengine.com/questions/742/bug-compiler-linker-error-umaterialinterfacegetwid.html describes.. when in C++ you do a GetWidth/GetHeight on a UMaterialInstanceDynamic you get an unreferenced link error on UMaterialInterface

Above topic is closed but I have the exact same issue and well I'm on the latest build of the UE (4.7.6)

So I'm wondering if there's a way to bypass it. What reference do I to add to fix this? Or is there another way to get the width/height of UMaterialInstanceDynamic ?

Product Version: UE 4.7
more ▼

asked Jun 07 '15 at 06:12 PM in Bug Reports

avatar image

10 3 7 8

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

1 answer: sort voted first

Hi djmulder,

Our process back in beta was different than it is now. This was marked as resolved in beta because it was able to be resolved by editing the source code, which was a suitable solution at the time. Seeing as we are now released, I've put a bug into our database for this issue. For your reference, the bug number is UE-16755. In the meantime, if you are able to use the source code version of the engine, you can make a few simple changes to fix this issue. Navigate to the file "MaterialInterface.h" and change the following lines of code from:

 int32 GetWidth() const;
 int32 GetHeight() const;


 ENGINE_API int32 GetWidth() const;
 ENGINE_API int32 GetHeight() const;

The issue you were experiencing was because these functions weren't being exported to the ENGINE_API as most functions are, so it was giving you an access violation.

Have a nice day

Matthew Clark

more ▼

answered Jun 09 '15 at 07:39 PM

avatar image djmulder Jun 10 '15 at 02:21 PM

Cool thanks,

I sadly don't run on the source version, tho I probably should.

But yeh thanks. I'll see if I can transfer into the source version.

avatar image dude8604 Jan 15 '17 at 03:23 AM

Still broken in 4.14.3

avatar image Doctor-G Feb 15 '18 at 06:46 PM

GetWidth() still seems to be broken on UMaterialInstance. It compiles, but the link step fails with:

SlidingTilePuzzle.cpp.obj : error LNK2019: unresolved external symbol "public: int __cdecl UMaterialInterface::GetWidth(void)const " (?GetWidth@UMaterialInterface@@QEBAHXZ) referenced in function "protected: virtual void __cdecl ASlidingTilePuzzle::BeginPlay(void)" (?BeginPlay@ASlidingTilePuzzle@@MEAAXXZ)

This is running 4.18.3.

avatar image xCharlesx Feb 05 '19 at 01:18 PM

GetWidth is still broken, even with the fix suggested above it still fails with unresolved external symbol Running 4.21.2

(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