# Adding Interface to UserWidget via Editor does not work properly

**URL:** <https://forums.unrealengine.com/t/adding-interface-to-userwidget-via-editor-does-not-work-properly/421130>\
**Category:** UI\
**Tags:** interface, unreal-engine, bug-report, Widget, CPP, question, Blueprint\
**Created:** [March 28, 2018, 5:32pm UTC](https://forums.unrealengine.com/t/adding-interface-to-userwidget-via-editor-does-not-work-properly/421130 "2018-03-28T17:32:36Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![StarfireDev](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@StarfireDev](https://forums.unrealengine.com/u/StarfireDev)\
**Post date:** [March 28, 2018, 5:32pm UTC](https://forums.unrealengine.com/t/adding-interface-to-userwidget-via-editor-does-not-work-properly/421130/1 "2018-03-28T17:32:36Z")

</div>

Actually this thread is a result of a previous post : [Adding Interface to UserWidget fails casting - UI - Unreal Engine Forums](https://answers.unrealengine.com/questions/773500/adding-interface-to-userwidget-fails-casting.html)

How to reproduce:

- Create an empty Interface class via c++;
- Inside the editor, create a WidgetBlueprint, inside the Class Settings add the Interface previously created;
- Via C++, create this widget and try to Cast\<\> to this new Interface. It returns null.
  - Also, call UKismetSystemLibrary::DoesImplementInterface and see it returns **true** ;

- Now, if you extend the UUserWidget via c++ and add this interface through code and try to cast it, it passes.

What is expected is that we could add interfaces via Blueprint and cast it properly, without the need to hardcode it via c++.

---

<div class="post-metadata">

**Author:** ![Jeff\_A](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Jeff\_A](https://forums.unrealengine.com/u/Jeff_A)\
**Post date:** [March 29, 2018, 9:08pm UTC](https://forums.unrealengine.com/t/adding-interface-to-userwidget-via-editor-does-not-work-properly/421130/2 "2018-03-29T21:08:38Z")

</div>

Hello,

We’ve recently made a switch to a new bug reporting method using a more structured form. Please visit the link below for more details and report the issue using the new Bug Submission Form. Feel free to continue to use this thread for community discussion around the issue.

[https://forums.unrealengine.com/unreal-engine/announcements-and-releases/1410408-unreal-engine-bug-submission-form](https://forums.unrealengine.com/unreal-engine/announcements-and-releases/1410408-unreal-engine-bug-submission-form)

Thanks

---

<div class="post-metadata">

**Author:** ![StarfireDev](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@StarfireDev](https://forums.unrealengine.com/u/StarfireDev)\
**Post date:** [April 2, 2018, 4:19pm UTC](https://forums.unrealengine.com/t/adding-interface-to-userwidget-via-editor-does-not-work-properly/421130/3 "2018-04-02T16:19:36Z")

</div>

Done, thanks!
