Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add option for Variable Get to use a "validation mode" #630

Closed
Naros opened this issue Aug 1, 2024 · 0 comments · Fixed by #631
Closed

Add option for Variable Get to use a "validation mode" #630

Naros opened this issue Aug 1, 2024 · 0 comments · Fixed by #631
Labels
cherrypick:2.0 Requires cherry-pick to Orchestrator 2.0 kind/enhancement New feature or request
Milestone

Comments

@Naros
Copy link
Member

Naros commented Aug 1, 2024

Description

When a variable is typed as Variant::OBJECT, the underlying variable will initially start being null. This means that users need to be mindful of this and check for this use case in their code. However, rather than adding the need for the users to introduce branch conditions in the graph, an optimized Variable Get node can automatically handle this:

image

Conceptually, when the variable is null, the node exits the Is Not Valid output pin. If the variable is not null, it exits the Is Valid pin. This avoids the need for using is_instance_valid or null checks for such variables.

Implementation ideas

No response

@Naros Naros added kind/enhancement New feature or request cherrypick:2.0 Requires cherry-pick to Orchestrator 2.0 labels Aug 1, 2024
@Naros Naros added this to the 2.1 milestone Aug 1, 2024
Naros added a commit to Naros/godot-orchestrator that referenced this issue Aug 1, 2024
Naros added a commit to Naros/godot-orchestrator that referenced this issue Aug 1, 2024
Naros added a commit to Naros/godot-orchestrator that referenced this issue Aug 1, 2024
@Naros Naros closed this as completed in #631 Aug 1, 2024
Naros added a commit that referenced this issue Aug 1, 2024
Naros added a commit that referenced this issue Aug 1, 2024
Naros added a commit that referenced this issue Aug 1, 2024
Naros added a commit that referenced this issue Aug 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cherrypick:2.0 Requires cherry-pick to Orchestrator 2.0 kind/enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant