Table of Contents

Method Register

Namespace
Velvet
Assembly
Velvet.Docs.dll

Register(string, VisualElement)

Registers a Portal mount target. A second registration of the same ID logs a warning and overwrites.

public static void Register(string id, VisualElement target)

Parameters

id string

Identifier used by Portal consumers to look up the mount target. Null or empty values are rejected with a warning.

target VisualElement

The destination UnityEngine.UIElements.VisualElement that Portal children are appended to. Null is rejected with a warning.