Octopus Gamers
Índice UEFNInício da documentação UEFN

Primeiros passos

Referência do editor

Build Your First Island

Level Up with Verse

Learn Game Mechanics

Criar gameplay

Devices essenciais

Verse com devices

Scene Graph

Testar e publicar

Unreal Engine para quem vem do UEFN

Documentação UEFN

Verse tags no UEFN: criar, atribuir e achar objetos e entities

Atualizado em 05/12/2026 · Baseado na documentação oficial (Epic Games)

Component Verse Tag Markup com a tag mytag e botão Edit Tags de uma entity no UEFN
Imagem: Epic Games, documentação oficial · captura de tela

Com Verse tags, você encontra, durante o jogo, objetos marcados com uma tag: creative devices, props e entities do Scene Graph. Dá para operar vários objetos de uma vez, sem criar propriedades e referências uma a uma no editor. Este guia resume a página oficial "Verse Tags" da Epic, em nossas palavras.

Para que servem

As ideias da Epic incluem: mudar a montagem do nível sem mexer nas referências do seu Verse device, achar todos os objetos com uma tag e operá-los conforme o tipo (acender luzes, alternar barreiras), mudar dinamicamente quais objetos estão ativos conforme o progresso do jogador, ou ativar objetos de um percurso de obstáculos conforme a dificuldade escolhida.

O que pode receber tag: props, devices e Verse-authored devices (só no editor) e entities (no editor e em tempo de execução).

Criar uma tag

A tag é uma classe que herda de tag, e o nome da classe é o nome da tag. Adicione o using do módulo de tags, crie a classe, salve e clique em Compile Verse na toolbar do UEFN:

using { /Verse.org/Simulation }
using { /Verse.org/Simulation/Tags }

# Derive from the `tag` class in the Verse.org/Simulation/Tags module to create a new gameplay tag.
mytag := class(tag){}

As tags são hierárquicas pela herança de classes, com quantos níveis você quiser. No exemplo da Epic, todo objeto com banana_tag também é classificado como fruit_tag. A Epic recomenda uma convenção de nomes consistente.

fruit_tag<public> := class(tag){}
apple_tag<public> := class(fruit_tag){}
banana_tag<public> := class(fruit_tag){}

Atribuir a tag no editor

Devices, props e Verse devices

Selecione o objeto no Outliner e, no Details, clique em Add (Add New Component) e escolha Verse Tag Markup. Selecione o component VerseTagMarkup e, em Tags, edite a propriedade e adicione a sua tag (no exemplo, mytag em um Button device).

Painel Details de um Button device com o menu Add aberto e a opção Verse Tag Markup destacada
Add > Verse Tag Markup no Details do device. Imagem: Epic Games, documentação oficial (Verse Tags).
Component VerseTagMarkup com a lista de tags aberta e a tag mytag marcada
A tag mytag adicionada ao component. Imagem: Epic Games, documentação oficial (Verse Tags).

Você pode colocar várias tags no mesmo objeto, e ele será achado por qualquer uma delas. Com mytag1 e mytag2, tanto FindCreativeObjectsWithTag(mytag1) quanto FindCreativeObjectsWithTag(mytag2) o encontram.

Entities

Selecione a entity e, no Details, clique em Edit Tags. Daí adiciona e gerencia as tags de forma parecida.

Painel Details de uma entity SphereLight com o botão Edit Tags e a dica Edit tags for selected entities
O botão Edit Tags de uma entity. Imagem: Epic Games, documentação oficial (Verse Tags).

Achar creative objects por tag

Durante o jogo, FindCreativeObjectsWithTag() devolve um array de tudo que implementa creative_object_interface e tem a tag. Se você marcou um Button device e um Customizable Light device com mytag, os dois voltam.

using { /Fortnite.com/Devices }
using { /Verse.org/Simulation }
using { /Verse.org/Simulation/Tags }

FindCreativeObjectsWithTagExample1(InDevice:creative_device):void =
    TaggedObjects := InDevice.FindCreativeObjectsWithTag(mytag)

Na hierarquia, o resultado depende do nível da tag buscada: FindCreativeObjectsWithTag(banana_tag) devolve só objetos com banana_tag; FindCreativeObjectsWithTag(fruit_tag) devolve também os com apple_tag e banana_tag.

Cast para o tipo certo

Para chamar funções específicas, como TurnOff() de uma luz, é preciso converter o resultado com um cast falhável: NovaReferencia := tipo[Referencia]. O cast falha se o objeto for de outro tipo (um Button device não vira customizable_light_device). Num for, a expressão falhável funciona como filtro:

FindCreativeObjectsWithTagExample3(InDevice:creative_device):void =
    TaggedObjects := InDevice.FindCreativeObjectsWithTag(mytag)

    for (TaggedObject : TaggedObjects, LightDevice := customizable_light_device[TaggedObject]):
        LightDevice.TurnOff()

Para tratar tipos diferentes conforme o caso, use if / else if:

FindCreativeObjectsWithTagExample4(InDevice:creative_device):void =
    TaggedObjects := InDevice.FindCreativeObjectsWithTag(mytag)

    for (TaggedObject : TaggedObjects):
        if (LightDevice := customizable_light_device[TaggedObject]):
            # If the tagged object is a Customizable Light device, turn it off
            LightDevice.TurnOff()
        else if (BarrierDevice := barrier_device[TaggedObject]):
            # If the tagged object is a Barrier device, turn it off
            BarrierDevice.Disable()

Atenção à ordem: o array vem numa ordem arbitrária definida pelo sistema, que você não controla e que pode mudar entre chamadas se objetos forem adicionados ou removidos. Se o seu jogo depende de uma ordem, a Epic manda usar um array editável em vez de tags (veja Editable properties).

Posição por tipo

Um exemplo da Epic filtra o resultado por tipo e imprime a posição de cada um: creative_prop para props, creative_device_base para devices e creative_device para Verse-authored devices.

using { /Fortnite.com/Devices }
using { /Verse.org/Simulation }
using { /Verse.org/Simulation/Tags }
using { /Verse.org/SpatialMath }

FindCreativeObjectsWithTagExample5(InDevice:creative_device):void =
    # find all objects with the all_tag
    AllCreativeObjects := InDevice.FindCreativeObjectsWithTag(all_tag)

    # Print the position of all creative_prop objects with the all_tag
    for (Obj : AllCreativeObjects):
        if (Prop := creative_prop[Obj]):
            Print("Prop found with all_tag at position: {Prop.GetGlobalTransform().Translation}")

    # Print the position of all device objects with the all_tag
    for (Obj : AllCreativeObjects):
        if (Device := creative_device_base[Obj]):
            Print("Creative device found with all_tag at position: {Device.GetGlobalTransform().Translation}")

Tags em entities, só com Verse

Com entities do Scene Graph você atribui tags direto em código, sem a UI do editor. O exemplo usa tags em hierarquia (a Epic marca as "categorias" como <abstract>):

using { /Verse.org/SceneGraph }
using { /Verse.org/Simulation/Tags }

vehicle_tag := class<abstract>(tag){}
motorcycle_tag := class<abstract>(vehicle_tag){}
ducati_tag := class(motorcycle_tag){}
triumph_tag := class(motorcycle_tag){}

color_tag :=  class<abstract>(tag){}
red_tag :=  class(color_tag){}
yellow_tag :=  class(color_tag){}
black_tag :=  class(color_tag){}

AddTag() adiciona; ContainsTag[] verifica uma tag; ContainsAllTags[] exige todas; ContainsAnyTag[] exige ao menos uma. Todas são falháveis e, por causa da herança, ContainsTag[tag] responde se a entity tem qualquer tag:

ExampleAddTag1():void =
    MotorcycleEntity := entity{}
    MotorcycleEntity.AddTag(ducati_tag{})
    MotorcycleEntity.AddTag(red_tag{})

    if:
        MotorcycleEntity.ContainsTag[ducati_tag]
        MotorcycleEntity.ContainsTag[red_tag]
    then:
        Print("The entity is a red Ducati.")

ExampleAddTag3():void =
    MotorcycleEntity := entity{}
    MotorcycleEntity.AddTag(ducati_tag{})
    MotorcycleEntity.AddTag(red_tag{})
    MotorcycleEntity.AddTag(yellow_tag{})

    if:
        MotorcycleEntity.ContainsTag[ducati_tag]
        MotorcycleEntity.ContainsAnyTag[red_tag, yellow_tag]
    then:
        Print("The entity is a Ducati that is either just red or just yellow, or both red and yellow.")

Remover tags

Dá para remover de forma ampla ou estreita. RemoveAllTags[color_tag] tira todas as tags da categoria de cor; RemoveAllTagsExcept[motorcycle_tag] mantém só as de moto; RemoveAllTags[tag] limpa tudo. Essas funções são falháveis, e por isso a Epic as chama dentro de option{...}:

ExampleAddRemoveTag1():void =
    MotorcycleEntity := entity{}
    MotorcycleEntity.AddTag(ducati_tag{})
    MotorcycleEntity.AddTag(red_tag{})

    if:
        MotorcycleEntity.ContainsAllTags[vehicle_tag, red_tag]
    then:
        Print("The entity is a red vehcile.")

    option{MotorcycleEntity.RemoveAllTags[color_tag]}

    if:
        MotorcycleEntity.ContainsTag[vehicle_tag]
        not MotorcycleEntity.ContainsTag[color_tag]
    then:
        Print("The entity is a colorless vehicle.")

AddTag() devolve uma chave. É válido adicionar duas instâncias do mesmo tipo de tag, e RemoveTag[Chave] remove só aquela instância: a entity continua "vermelha" até as duas serem removidas.

ExampleAddRemoveTag2():void =
    MotorcycleEntity := entity{}
    MotorcycleEntity.AddTag(ducati_tag{})
    Key1 := MotorcycleEntity.AddTag(red_tag{})
    Key2 := MotorcycleEntity.AddTag(red_tag{}) # It is perfectly valid to add another instance of an already existing tag type

    # Note, this will only remove the first red_tag instance, not the second one.
    option{MotorcycleEntity.RemoveTag[Key1]}

    if:
        MotorcycleEntity.ContainsAllTags[motorcycle_tag, red_tag]
    then:
        Print("The entity is still a red motorcycle.")

    option{MotorcycleEntity.RemoveTag[Key2]}

Achar entities por tag

Para entities, as funções são outras: FindDescendantEntitiesWithTag (todos os descendentes com a tag, incluindo o alvo) e FindAncestorEntitiesWithTag (todos os ancestrais). A entity precisa estar em uma hierarquia; uma entity avulsa com tag não é encontrada. Tags em entities seguem as mesmas regras de combinação e herança de components em prefabs (veja Prefabs no Scene Graph).

ExampleFindDescendantEntitiesWithTag1(InEntity:entity):void =
    MotorcycleEntity1 := entity{}
    MotorcycleEntity1.AddTag(ducati_tag{})
    MotorcycleEntity1.AddTag(red_tag{})
    MotorcycleEntity1.AddTag(black_tag{})

    MotorcycleEntity2 := entity{}
    MotorcycleEntity2.AddTag(triumph_tag{})
    MotorcycleEntity2.AddTag(black_tag{})

    if:
        SimEntity := InEntity.GetSimulationEntity[]
    then:
        SimEntity.AddEntities(array{MotorcycleEntity1, MotorcycleEntity2})

        for:
            FoundEntity : SimEntity.FindDescendantEntitiesWithTag(red_tag)
        do:
            Print("Found an entity that is red.")

        for:
            FoundEntity : SimEntity.FindDescendantEntitiesWithTag(black_tag)
            FoundEntity.ContainsTag[motorcycle_tag]
        do:
            Print("Found a black motorcycle.")

Para buscar para cima, ChildEntity1.FindAncestorEntitiesWithTag(yellow_tag) acha o pai marcado com yellow_tag. Para buscar só dentro de uma "garagem", chame a função na entity que serve de raiz (por exemplo, GarageA.FindDescendantEntitiesWithTag(vehicle_tag)), em vez de na simulation entity.

Veja também

Fonte oficial e créditos

Esta página é uma explicação própria, em português, feita pela Octopus Gamers a partir da documentação oficial (Epic Games). Não é tradução oficial. Para o texto original em inglês, consulte:

Imagens: capturas da documentação oficial da Epic Games, com link para a página de origem em cada legenda. Unreal Editor for Fortnite, UEFN, Fortnite e Verse são marcas da Epic Games. Conteúdo conferido com a documentação oficial em 05/12/2026.