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"

Can't call function library's function in macro library?

In UE 4.8, I have written some functions in function library, and some macros in macro library which inherited from UObject, and it worked well, I could get the right function from 'right click filter menu' no matter whether 'context sensitive' was checked. In UE 4.9, I can't find the function name from 'right click filter menu' any more. Is that no supported?

So, I make a experiment. I move macros to another macro library which inherit from AActor, I get the right function again! I noticed that in UE 4.9, when I call functions that in function library, there’s always a WorldContextObject pin at the last parameter even for the very simple function that not refer to the WorldContextObject. But UE 4.8 do not have this problem. Is this the new restriction or feather in UE 4.9? Can't I call function in function library from UObject inherited macro library any more?

Another problem is when I call a function that refer to a WorldContextObject, of course in AActor inherited macro library, I get an error when engine cook contents for windows, says:'this blueprint (self) is not a 'XXXFunctionLibrary', therefore 'Target' must have a connection.' For the function that not refer to WorldContextObject, it works well. This problem confuse me that AActor macro library should have a WorldContextObject itself, and the function I called belongs to a function library, does it need a self Target? why it always through the error?

Product Version: UE 4.9
Tags:
more ▼

asked Nov 02 '15 at 09:46 AM in Bug Reports

avatar image

喵胖
26 3 5 9

avatar image Doug E ♦♦ STAFF Nov 03 '15 at 03:45 PM

Hello,

I'm not sure I fully understand what is happening. Your function library functions are not able to be called in the editor is that correct? How are you setting up your function library and your macro library? If possible please include screenshots of your setup so that I can use them as a guideline to test this issue locally.

Cheers

Doug Wilson

avatar image 喵胖 Nov 04 '15 at 08:42 AM

Hello

For question 1,

Maybe you can make a test as follow steps:

1) Create a new FunctionLibrary, and add a function 'TestFunc' in it alt text

2) Create a new MacroLibrary, inherit from UObject, and add a macro 'TestMacro' in it

3) Select 'TestMacro', click mouse's right button, in the pop down 'All Possible Actions' menu, can you find 'TestFunc'? I my editor, I can't find it.

alt text

4) In Step 2, if you create a new MacroLibrary inherit from UActor, and make a test as Step 3, you can find 'TestFunc'.

alt text

so why in step 3 I cannot find 'TestFunc'?

For question 2,

1) Create a new function 'APlusB' in the FunctionLibrary you just created in previous steps.It just calculate 'A' plus 'B' and return the result.

alt text

2) Call 'APlusB' in 'TestFunc' which you created in previous steps.

alt text

3) You can find a 'WorldContextObject' pin at the input side even 'APlusB' don't need 'WorldContextObject'.

Is this normal?

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

1 answer: sort voted first

I was able to reproduce both issues that you've described. The World Context pin does not appear to affect the function being called and still compiles successfully, however it has been bugged (UE-22910). The Function Library/Macro Library issue was also bugged (UE-22946) for investigation.

Cheers

Doug Wilson

more ▼

answered Nov 04 '15 at 03:58 PM

avatar image 喵胖 Nov 05 '15 at 08:54 AM

Thank you! One more thing is I wonder if the 'The Function Library/Macro Library' issue will be fixed in next version(4.10)?

avatar image Doug E ♦♦ STAFF Nov 05 '15 at 03:14 PM

We try to get to each issue as quickly as possible but an exact time frame is unknown.

avatar image MJ_01 Sep 25 '16 at 02:47 AM

As this seems to still not be fixed in 4.13, I am going to take your word that it still doesn't affect function calls. Also, I tried looking up UE-22910 in the issue tracker and it gives me the unknown issue error.

avatar image Doug E ♦♦ STAFF Sep 26 '16 at 02:56 PM

Hey MJLaukala-

UE-22910 is not publicly visible due to sensitive information. The bug report, which is specifically for the World Context pin appearing on nodes, has been closed as fixed in 4.11. If you are seeing the World Context pin on your blueprint nodes, please provide additional information and we will reopen the report as necessary.

avatar image CatherineIrkalla Dec 02 '18 at 05:20 PM

I seem to be having a similar issue in 4.21 - I can't get a function created in my function library from a macro library and my function library nodes have World Context pins all over the place (though not setting seems to make no difference)

(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