• RuntimesUnity
  • Handling events using Visual Scripting

Hello! I'm trying to move some of my codebase to Visual Scripting in order to make content updates with addressables available for game logic.
I've encountered a problem that, if you use C# events, not Unity events, they are not displayed in the Script graph editor. How do i manage to tie SkeletonAnimation.AnimationState.Event to my visual scripting nodes? do i have to make my own nodes for that?

  • Harald ответили на это сообщение.
    Related Discussions
    ...

    @kostbllb How do i manage to tie SkeletonAnimation.AnimationState.Event to my visual scripting nodes? do i have to make my own nodes for that?

    You would create a standard wrapper for that, wrapping your unsupported types in a layer where supported types are stored and forward the respective calls to the unsupported types. While I don't know what visual scripting language you are using, the answer likely is yes, you will need to write some wrapper nodes for that.

    kostbllb I'm trying to move some of my codebase to Visual Scripting in order to make content updates with addressables available for game logic.

    Admittedly I don't quite understand why using visual scripting would improve the situation in regards to modularity and having updates available as on-demand downloads. Typically you would need to 1) find certain objects and then 2) call certain methods at said objects, which could be done using normal C# scripting as well. I would recommend reconsidering whether this move is really necessary at all, before perhaps migrating everything unnecessarily.

    • kostbllb ответили на это сообщение.

      Harald i intend to use Unity's builtin visual scripting feature aka Bolt. it might help with on-demand content because it doesn't require building new version of Player with C# scripts when my logic changes, which effectively breaks Unity's content update builds. I read about some way of plugging AOT compiled code at runtime but I havent' gave it much thought beacuse v.s. looked simpler

      It could be done either way, it's a matter of preference I guess. 🙂