Skip to content

Commit

Permalink
Document a case from Slack
Browse files Browse the repository at this point in the history
  • Loading branch information
migueldeicaza committed Mar 20, 2024
1 parent b3fdc7a commit 7c34297
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions Sources/SwiftGodot/SwiftGodot.docc/Exports.md
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,17 @@ public override func _ready()
}
```

If you find yourself that you do not want to provide manual get/set properties
in your export, and want to have an optional for one of the Object types, you
can use something like this:

```swift
@Export(.nodeType, "Camera3D")
var camera: Camera3D? = nil
```

The parameter to `.nodeType` needs to match the type of the object.

### Resources

```
Expand Down

0 comments on commit 7c34297

Please sign in to comment.