From e554f75bfd834a214efe45b8ec59337e7b5e95df Mon Sep 17 00:00:00 2001 From: Louis Poirier Date: Sun, 25 Jan 2026 17:27:49 +0100 Subject: [PATCH] docs: update wiki in UI section Show how to get an `inkComponent` back from the widget tree. --- wiki/Home.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/wiki/Home.md b/wiki/Home.md index 7a78846e..6bebd7dc 100644 --- a/wiki/Home.md +++ b/wiki/Home.md @@ -808,6 +808,14 @@ comp.SetColor(new HDRColor(1.1761, 0.3809, 0.3476, 1.0)); comp.Reparent(parent); ``` +You can get back your `inkComponent` instance from the widget tree like this: + +```swift +// assuming MyComponent is the first child of its parent. +let child = parent.GetWidget(0); +let comp = child.GetController() as MyComponent; +``` + > **Backwards compatibility** > Existing mods can keep using `inkCustomController` without changes.