Display Widget Using Verse

Hello. I’m trying to display a widget on the screen using Verse.

So I created a widget. I made it simple. It is just a canvas with an image on it. I stuck the file in the root of the content browser. It is named Task1Widget.

I create this class:

using { /Fortnite.com/Devices }
using { /UnrealEngine.com/Temporary/UI }

task_manager_device := class(creative_device)
{
    MyWidget : widget = Task1Widget{}

    OnBegin<override>()<suspends>:void=
    {
        #Print("task_manager_device::OnBegin")
    }
}

Everything compiles OK. It’s in Assets.digest.verse:

Task1Widget<scoped {/acme@fortnite.com/Apex}> := class<public>(widget):

But then I get this when I try to start a session:

PlatformCook: Error: We hit an error while cooking this content
PlatformCook: Error: errors.com.epicgames.content-service.cook_failure
PlatformCook: Error: CookJobId:e2a6bbd2-9281-4449-92ce-d14787edcdc6
PlatformCook: Error: An error occurred while communicating with the game servers (failed to cook module 3dc0e0a1-4ca5-f61e-87f2-81bbeb50b01e (artifact a93e0928-3c1f-451e-94be-ecff9f447599:linux-server) (cookJobId e2a6bbd2-9281-4449-92ce-d14787edcdc6) with error code errors.com.epicgames.cookplugin.versebuildscripterror).
LogValkyrieActivityTracker: Warning: Session -> Fail Activity: LoadingNewContent - Error updating content
LogValkyrieSummary: Failed to update content due to error.
PlatformCook: Error: VerseBuild: Error: C:/build/FortniteGame/Plugins/GameFeatures/3dc0e0a1-4ca5-f61e-87f2-81bbeb50b01e/Content/task_manager_device.verse(13,25, 13,36): Script error 3506: Unknown identifier `Task1Widget`.
PlatformCook: Error: VerseBuild: Error: C:/build/FortniteGame/Plugins/GameFeatures/3dc0e0a1-4ca5-f61e-87f2-81bbeb50b01e/Content/task_manager_device.verse(13,25, 13,36) : Script error 3506: Unknown identifier `Task1Widget`.
PlatformCook: Error: LogSolLoadCompiler: Error: Forcing exit after Verse compilation failure due to command line parameter -ExitOnVerseCompileFailure
PlatformCook: Error: VerseBuild: Error: C:/build/FortniteGame/Plugins/GameFeatures/3dc0e0a1-4ca5-f61e-87f2-81bbeb50b01e/Content/task_manager_device.verse(13,25, 13,36): Script error 3506: Unknown identifier `Task1Widget`.
PlatformCook: Error: VerseBuild: Error: C:/build/FortniteGame/Plugins/GameFeatures/3dc0e0a1-4ca5-f61e-87f2-81bbeb50b01e/Content/task_manager_device.verse(13,25, 13,36) : Script error 3506: Unknown identifier `Task1Widget`.
PlatformCook: Error: LogSolLoadCompiler: Error: Forcing exit after Verse compilation failure due to command line parameter -ExitOnVerseCompileFailure

Can I not do that? Is it not possible to directly add a widget to a UI using Verse? :confused:

Basically, this line right here:

MyWidget : widget = Task1Widget{}

Causes the entire thing to fail.

Is that by design?? Or is that a bug??

I take it that it is not possible to directly use widget blueprints in Verse. :confused:

I assume the only options are to:

  • use a tracker device - which won’t work because it is too buggy

  • use a hud message device - which won’t wont work because it is too simple … and also because the precise placement and scaling can’t be controlled in Verse

  • use Verse - yes! yay! … BUT … can’t control the font size or style at all … stuck with only the ginormous old ugly default Burbank Big Black font or whatever is

I was hoping we could simply create a widget blueprint and directly use it in Verse like any of the other widget. But I guess not.

Am I correct or am I wrong?

If I’m right, does anyone know if allowing us to either directly use widget blueprints in Verse or at least allow us to change the font size and style of a text_block is on the roadmap?