Verse Libraryverse

01 Snippet

Provides extension methods to retrieve the UI icon texture and localized display name for a given player agent.

extracted-snippets/community/learning/tutorials/Kx9x/fortnite-82f910/01-snippet.verse

# Source URL: https://dev.epicgames.com/community/learning/tutorials/Kx9x/fortnite-82f910
# Local doc:  verse-cortex-epic-docs/community/learning/tutorials/Kx9x/fortnite-82f910.md
using { /Verse.org/Simulation }
using { /Verse.org/Assets }
using { /Verse.org/SceneGraph }
using { /Fortnite.com/Characters }

(Agent:agent).GetIcon<public>()<decides><transacts>:texture=
    FortCharacter := Agent.GetFortCharacter[]
    CharacterEntity := FortCharacter.GetEntity[]
    IconComponent := CharacterEntity.GetComponent[icon_component]
    IconComponent.Icon

GetName<public><localizes>(Agent:agent):message="{Agent}"

Comments

    Sign in to vote, comment, or suggest an edit.Sign in