My main script (MultipleScript.cs), which manages all the logic of the game, is written in c#. It handles some objects (let’s say, like the health pickups in the tutorial): each of them has a corresponding integer value, saved in the attached script (StarScript.cs).
StarScript should also manage the rotation of these pickups, involving yield: I still haven’t been able to make yield work properly in c#, so I was thinking about rewriting the script in js; BUT I need to access the aforementioned integer value from the main script (via getter / setter methods), and I do not know how to call a js function (especially the getter: I don’t think the proper way to implement it is to have cs send a message to the receiver js method and then having this method send another message back - what’s more, I can neither make this solution work) from a c# script.
I’d be really, really grateful if anybody could help me.
EDIT: During the morning I managed to learn how to properly use coroutines
Still, I’m curious about how I can make my mixed scripts communicate (the getter question is still open).