Added Interface Blueprint functionallity#668
Conversation
Please check the Generated code if it can be cleaned up. Interfaces automatically implement a method to check if an UObject implements that interface in blueprints. Can be called by using the static interface method called Implements. Each interface function can also call the blueprint implementation directly on the UObject by using the generated static Interface.Execute function. Why this change? Example: You implement an Interface in U#. A Blueprint implements your interface. If you want to call your method from the Interface in U# the cast will fail. This change will allow to call those methods directly on the UObject
|
This is already a feature in U#. You can do |
|
This doesnt work for BP only interfaces (tried it already). Those can not be casted into Interfaces, since they are not actually implemented in code (atleast afaik). Epic also sais you need to use the Interface::Execute_Function methods You can try the setup as following: |
|
I think I want to look into this, I'd rather much add support to the AsInterface to support these cases. |
|
I added support for user created interfaces in AsInterface now. Merging! :D |

Please check the Generated code if it can be cleaned up.
Interfaces automatically implement a method to check if an UObject implements that interface in blueprints. Can be called by using the static interface method called Implements.
Each interface function can also call the blueprint implementation directly on the UObject by using the generated static Interface.Execute function.
Why this change?
Example:
You implement an Interface in U#.
A Blueprint implements your interface.
If you want to call your method from the Interface in U# the cast will fail.
This change will allow to call those methods directly on the UObject