So I’m running a controller C# script that will toggle a number of other scripts based on the state the player is in.
Right now I’m hitting the problem that two of these scripts are JS. For the C# scripts, I can simply call them and enable/disable them in the Update of this controller, but I know you can’t communicate with a JS from a C# script very easily.
How do I get around that?
EDIT:
For some specificity, the two Javascripts are the standard FPS Input Controller and the Character Motor from the First Person Controller prefab. If there’s any alternative to these out there, that would also solve my problem.
I’ve also just read a little bit about using the SendMessage function to pass a value from C# to Javascript, but I don’t know a lot about how to do this. Any insight is appreciated.