title: Godot 4 Tutorial - Exportable Node Paths
sources: https://www.youtube.com/watch?v=5ztwXNLa2-0
media_link: https://www.youtube.com/watch?v=5ztwXNLa2-0
Authors:
- "[[Game Gems]]"
contentPublished: 2023-10-03
noteCreated: 2024-11-19
description: Learn how to leverage the NodePath class to create unbreakable Unity-style object references in Godot.Godot NodePath documentation:https://docs.godotengine.o...
tags:
- clippings
- video
takeaways:
subjects:
- "[[Godot|Godot]]"
publish: true
Status: INTERESTING
Learn how to leverage the NodePath class to create unbreakable Unity-style object references in Godot.Godot NodePath documentation:https://docs.godotengine.o...
get_node("path/to/your/node")
$"path/to/your/node"
00:41: Godot converts your string into a NodePath class:
So $"Game World/Player"
becomes NodePath("Game World/Player")
@export var ui: NodePath
# this NodePath will auto update when a change is made in the editor.