x

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. 

link error: LinkGraphNodesFromMaterial unresolved external symbol

Hi,

I need the function LinkGraphNodesFromMaterial to update a graph in my plugin. However, during build, it reports:

error LNK2019: unresolved external symbol "public: void __cdecl UMaterialGraph::LinkGraphNodesFromMaterial(void)" (?LinkGraphNodesFromMaterial@UMaterialGraph@@QEAAXXZ) referenced in function "void __cdecl LinkToColorImage(class IMaterialEditor ,struct FColorMaterialInput &,class UTexture ,enum EMaterialSamplerType)" (?LinkToColorImage@@YAXPEAVIMaterialEditor@@AEAUFColorMaterialInput@@PEAVUTexture@@W4EMaterialSamplerType@@@Z)

I have set my plugin Type to editor.

I have included "MaterialGraph/MaterialGraph.h"

I have added "UnrealEd" module to dependencies.

But no work, and it seems that all the MaterialGraph function related objs are not linked.

Any ideas? Thanks!

PS: My full list of refed modules is : PublicDependencyModuleNames.AddRange(new string[] { "Engine", "Core", "LevelEditor", "Slate", "EditorStyle", "XmlParser", "ImageWrapper", "CoreUObject", "UnrealEd", "MaterialEditor", "DesktopPlatform"});

Product Version: UE 4.8
Tags:
more ▼

asked Aug 03 '15 at 11:27 AM in C++ Programming

avatar image

MilosBulatF
1 1 5 7

avatar image MilosBulatF Aug 03 '15 at 11:37 AM

I noticed that MaterialGraph has a tag "MinimalAPI", so that the LinkGraphNodesFromMaterial can not be called.

How can I do the same thing without calling this function?

I was just following: https://github.com/EpicGames/UnrealEngine/blob/master/Engine/Source/Editor/MaterialEditor/Private/Tests/MaterialEditorTests.cpp#L48

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

1 answer: sort voted first

I have found an alternative way to achieve the link and update by using MaterialExpression and PostEditChange

more ▼

answered Aug 03 '15 at 03:11 PM

avatar image

MilosBulatF
1 1 5 7

avatar image pengyancai Aug 28 '15 at 06:35 AM

hello,Do you solve this problem?

avatar image MilosBulatF Aug 28 '15 at 09:11 AM

Yes and it is a work around. LinkGraphNodesFromMaterial is by design can not be used.

(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