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

How to pass data with C#? #1

Open
Jearil opened this issue Aug 1, 2024 · 0 comments
Open

How to pass data with C#? #1

Jearil opened this issue Aug 1, 2024 · 0 comments

Comments

@Jearil
Copy link

Jearil commented Aug 1, 2024

Nice video and example code. I looked through it and it looks like you're using duck typing to assume that there's a variable or method to call to set data when you create a new scene from a scene path. This works ok in GDScript (though seems a bit brittle), but how would you do this sort of thing in a compiled language like C#? Would your scene switcher have to know the type of every scene it might switch to and what properties it has? Maybe you pass in a Function to call that does the creation and injection of parameters rather than only using a scene path? I'm just wondering how you do it if you want to use something other than GDScript that has compile-time checks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant