Hi guys!
So in my latest project, I have a script attached to my main camera which does most of the work. It sets the scene and checks mouse events. Everything works as I want it to when using a mouse but ultimately, I want it to work with TUIO.
At the moment, a touch is recognised and I even write to screen the name of the object being hit. The only problem is, this name is in the “SquareScript” script which is attached to each instance of a prefab, created through instantiation in code, and the array of squares is in the “SetupSquares” script. So I need to work out a way to either send the name of the selected square to “SetupSquares.js” or the array of squares to “SquareScript.js”. My troubles arise though because the squares are all created from one prefab so I can’t assign a notification object to send a message through. I also don’t seem to be able to create instances of other classes (unless i’m doing something wrong) to call functions.
Sorry if this isn’t a great explanation, didn’t want to have too long a question but if you need more information, feel free to ask!
Thanks,
Matt