Description

Right now, any UINTERFACE that is not marked as CannotImplementInterfaceInBlueprint is shown as implementable in blueprint. If these functions have BlueprintCallable functions or related things then the header tool will warn and tell you to fix it. But, if the interface is native only and has absolutely no blueprint-accessible things, there are no warnings. When you implement these interfaces in BP, nothing happens other than wasting memory. You can't cast them and pass as a TScriptInterface unless BlueprintType is set, and you can't call any functions on them. If you try to do a native cast or TScriptInterface<> assign in C++ it will return null. So, it doesn't crash but there's literally nothing you can do with these interfaces

A partial list of interfaces with this issue: IAnimClassInterface, IAnimLayerInterface, IBlendableInterface, ILevelPartitionInterface, IDestructibleInterface

I believe the correct fix is to change it so only interfaces that are marked as BlueprintType or have any UFunctions should show up as implementable. The list of things you can do with C++-defined-but-blueprint-implemented interfaces is actually very small, you can only call BlueprintNativeEvents via special wrappers, or use them as a "metadata" tagging system. In both cases you would mark it as BlueprintType. This issue in itself is not critical, but it is part of the general confusion about how blueprint interfaces work (which is now how developers expect them to work).

Steps to Reproduce
  1. Open up a blueprint and go to class settings
  2. Click Add Interface
  3. Notice that many of the interfaces like AnimClassInterface are selectable but do literally nothing when implemented

Have Comments or More Details?

There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-99628 in the post.

3
Login to Vote

Fixed
ComponentUE - Gameplay - Blueprint
Affects Versions4.26
Target Fix5.0
Fix Commit18163067
Release Commit18163067
CreatedSep 14, 2020
ResolvedNov 12, 2021
UpdatedJan 26, 2023
View Jira Issue