Home
  • English
  • 中文
Home
  • English
  • 中文
  • Get Started

    • Install
    • Hello LGUI
    • Custom Button
    • Use custom font
    • Prefab workflow
    • Interaction
    • Button from scratch
  • Sample Projects

    • Sample Projects
  • Prefab Workflow

    • LGUI Prefab
    • PrefabEditor
    • LGUILifeCycleBehaviour
    • LGUIPrefabInterface
  • Rendering

    • LGUICanvas
    • Screen Space Overlay
    • World Space - UE Renderer
    • World Space - LGUI Renderer
    • LGUI render flow
    • UICanvasGroup
  • Visual Components

    • UIText
    • UIEffect
    • TextAnimation
    • UIBackgroundBlur
    • UIBackgroundPixelate
  • Events

    • LGUIEventDelegate
    • LGUIEventSystem
  • Interaction Components

    • UISelectable component
  • Layout

    • Basic Layout
    • Auto Layout
  • Tween Animation

    • LTween
    • Use LTween for UI element
  • Performance

    • LGUI Stat
  • ReleaseNotes

    • LGUI 3.x
    • LGUI 2.x
  • FAQ

    • Why use prefab?
    • Update project from LGUI2 to LGUI3
    • Project 3d world position to LGUI's screen 2d position
    • Deproject LGUI's screen position to world
    • Use custom material for UI elements
    • Disable interaction component
    • Find Child by DisplayName
    • Get actor or component inside prefab
    • Anti-aliasing

Find Child by DisplayName

1. UIItem's DisplayName

UE4's actor don't have a persistent name, the name displayed in World Outliner is editor only. But sometimes we need a persistent name to find a UI item. LGUI's UIItem component provide a run-time valid property DisplayName, which is the same value as the actor displayed in World Outliner:

2. Functions to use the DisplayName:

Function:Description:
Find Child by Display Name (In Name)Search in children and return the first UIItem that the displayName match input name. Support hierarchy nested search, eg: InName = "Content/ListItem/NameLabel". Parameter In Name is case sensitive.
Find Child Array by Display Name (In Name)Like "FindChildByDisplayName", but return all children that match the case.

3. Change UIItem's DisplayName

Like descripted before, UIItem's DisplayName is the same as actor's label displayed in World Outliner, so just change the actor label in editor.
And in runtime, call function SetDisplayName to change it.

Last Updated:
Contributors: lf2007hf
Prev
Disable interaction component
Next
Get actor or component inside prefab