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?