> ## Documentation Index
> Fetch the complete documentation index at: https://rive.app/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# NodeRef

A node in the script's own artboard, picked in the editor's inspector as
an input. Exporting the file keeps the reference.

A write made in `advance` shows the same frame; one made in `draw` shows
from the next. A shape keeps its geometry in path children, so walk
`children` to reach paths.

```lua highlight={2,6} theme={null}
type Outline = {
  caster: Input<NodeRef>,
}

function draw(self: Outline, renderer: Renderer)
  local node = self.caster:get()
  if node then
    for _, child in node.children do
      local path = child:asPath()
    end
  end
end
```

## Methods

### `get`

```lua theme={null}
get() -> NodeData?
```

The node, or nil when none is picked or it was deleted. The same
node each call, so it can be kept: it reads empty once the scripted
object is gone.

```lua highlight={1} theme={null}
local node = self.caster:get()
if node then
  local world = node.worldTransform
end
```
