Skip to content

How to pass data with C#? #1

@Jearil

Description

@Jearil

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions