Class FiberPortalRegistry
- Namespace
- Velvet
- Assembly
- Velvet.Docs.dll
Registry that registers and retrieves the destination VisualElement for a Portal. A Portal renders its children into the container looked up here by id, rather than into its own position in the tree. Not thread-safe (main thread only).
public static class FiberPortalRegistry
- Inheritance
-
objectFiberPortalRegistry
Methods
- Get(string)
Gets a Portal mount target. Returns null if not registered.
- IsRegistered(string)
Returns whether the ID is registered.
- Register(string, VisualElement)
Registers a Portal mount target. A second registration of the same ID logs a warning and overwrites.
- Unregister(string)
Unregisters a Portal mount target.