So, I’m coming in Unity from extensive Director/Shockwave Lingo programming, with a little bit of ActionScripting in Flash.
After running through a bunch of tutorials, I’m will to try and start a simple “figure out how it works” project. However, there is something that I can’t wrap around my head, or otherwise I just can’t find the answer to.
Typically, my programming flow usually starts with…at the very beginning of the program, load in all the data and initialize all of my needed variables and such. Then I have all of my software which then creates or commands the graphic entities to their thing.
For example, let’s say I want to create a simple “find words on a grid” game. The first thing I would do is load in an external file of possible words into a data array variable, then I would have a bunch of functions where I would feed a list of letters to search for a possible word. Then there would be a bunch of functions that would create letter tiles and set the tiles to various statuses (stati?), such a selectible, what letter is it, etc. The letter tiles would have behaviors that would interpret those external functions, and take in mouse clicks or other inputs from the player.
Anyway, the issue I’m having is that the functions that handle the database of words, and the search for word functions would be “standalone” kind of functions and mehtods…things that I wouldn’t want to attach a visible GameObject. In flash, I would instantiate these thing at base root level of the game…in director, these would just be floating global functions.
But everything in Unity seems to be tied to a GameObject of sorts. Is this true…or am I missing something? I’ve played around with ScriptableObject, but then again, the only way I could create it is by having the camera instantiate it – thereby linking it to the camera. Does something as simple as keeping track of a gamestate need to be attached to a gameobject in some fashion?