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"

AnswerHub Maintenance

Background maintenance is scheduled to occur between 9 - 11am EDT on Tuesday, May 21. Site operation may be slower than normal during this time and a brief interruption in operation may be observed

How to pass interface ref as function parameter

Hello! How can I create Blueprint Implementable Event with Interface ref? I want it to have data type the same type as in the picture:

alt text

I've tryed this option:

 UFUNCTION(BlueprintImplementableEvent, BlueprintCallable, Category = "GlueHelper")
     TArray<AActor*> GetAllActorsOfInterface(const TScriptInterface<IInterface> &interfaceName);

But here is what I've got:

alt text

It has a type of interface, but not of class.

Product Version: UE 4.22
Tags:
снимок.jpg (19.3 kB)
снимок1.jpg (16.1 kB)
more ▼

asked Apr 12 '19 at 07:23 AM in C++ Programming

avatar image

AlexWrj
6 2 4

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

1 answer: sort voted first

you dont implement a interface by making a variable. you gotta go to the bp which needs to implement the interface and on the details panel of that bp(if you dont see the details panel or cant find what im gonna talk about click on class defaults on top). and then there will be a list of implemented interface. you can add your own interface in that list.

Interfaces will also be inherited if you inherit a BP.

here is a wiki page if you didnt understand what i said: https://docs.unrealengine.com/en-us/Engine/Blueprints/UserGuide/Types/Interface/UsingInterfaces

P.S: the above wiki page uses level blueprint as a example, u can use any other bp aswell.

more ▼

answered Apr 12 '19 at 09:45 AM

avatar image

SupDeity
313 3 6 15

avatar image SupDeity Apr 12 '19 at 09:47 AM

and i dont remember but i think you can get all class implementing a specific interface aswell and you can also use a reference to check whether it implements a interface or not. just search for it using the bp nodes.

(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