Skip to content

Commit

Permalink
put gd- before reference for consistency
Browse files Browse the repository at this point in the history
  • Loading branch information
Lamby777 committed Dec 1, 2023
1 parent eab0838 commit 850ba50
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/intro/objects.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ constructor list.

```admonish note
`init` cannot take custom parameters. There are however a few ways around that.
- From Rust code, simply call [`Gd::from_init_fn()`][from-init-fn].
- From Rust code, simply call [`Gd::from_init_fn()`][gd-from-init-fn].
- From GDScript, you can write a custom method such as `post_init()`, which late-initializes fields. This will reduce type safety though,
needing `Option` for fields whose values aren't available at initialization time.
- Another alternative is to use a third-party class such as `PlayerFactory`, which has a method accepting parameters and returning a
Expand All @@ -122,6 +122,6 @@ Keep in mind that node classes in Godot are manually-managed. When outside the s
using [`free()`][gd-free].


[from-init-fn]: https://godot-rust.github.io/docs/gdext/master/godot/obj/struct.Gd.html#method.from_init_fn
[gd-from-init-fn]: https://godot-rust.github.io/docs/gdext/master/godot/obj/struct.Gd.html#method.from_init_fn
[gd-free]: https://godot-rust.github.io/docs/gdext/master/godot/obj/struct.Gd.html#method.free
[gd]: https://godot-rust.github.io/docs/gdext/master/godot/obj/struct.Gd.html

0 comments on commit 850ba50

Please sign in to comment.