• 2 Posts
  • 8 Comments
Joined 1 year ago
cake
Cake day: July 5th, 2023

help-circle


  • Thanks for the explanation! Your explanation led me down a rabbit hole of seeing if there’s a way to cancel an await call, from what I can tell there was no clear way to do so. In my case I ended up connecting the signal to a secondary function instead of utilizing the await command, I’m not entirely sure if there’s an advantage to utilizing one method over the other.



  • Thanks so much for testing that out! That’s very informative and even more thorough than what I was looking for! I wasn’t at my computer when I posted this so I couldn’t test it myself.

    I ended up connecting the signal to a secondary function to run on finished to avoid any potential memory errors, but it’s super helpful to know that the performance impact is minimal.



  • Hm…I didn’t even consider that the emit might be happening before the connection. I have them both running from separate on_ready methods. Perhaps I should be running connection though _init. Typically in unity I would just use C# actions and use OnEnable to establish the “connections.” It make sense that the code could be emitting before I even have a chance to connect to it, which is why my test fails.


  • Thank you! Okay so the tiles are part of a map, and I have a parent node called map with two separate children: hexgrid (where I’m instantiating the scenes) and spawn_objects( where I’m trying to gain access to the index and transform from hexgrid) my intent is to have hexgrid generate the grid and tiles and have spawn_objects instantiate an object within the tile at a certain position within it. Is this perhaps something I should combine into the same script? I typically like to have things modular and keep each component so a single specific task.