Hi there,
I’ve just discovered Unity and I wanted to give it a try by developing my first game ever (I’m an engineer with a good programming background but I never had enough time to make a game
).
I’ve learned C# by developing apps for Windows Phone, and this gave me some concepts on how MVVM works and stuff like that.
Since Unity supports C#, I thought that I would have been able to make a game without problems, by using what I learnt during my WP experience.
Now, after some days of tests, I’m afraid that I was wrong.
I’m finding it hard to understand how to make some scripts “communicate” and share data, how to access to some specific class instance and stuff like that.
So I’m asking for your help with a few questions.
Provided that I already have a clear idea on how my game should work, what’s the correct workflow to get from the idea to the actual game (including advertising, social capabilities and everything needed to make a “professional” app)?
What’s the best practice to separate the roles for my classes?
How can I build a game manager class that interacts with the elements on the scene and reacts to what happens after user’s input?
I know that the questions may seem odd, that’s why I’m adding a quick sample:
Let’s say that I’ve got a GUI with a button and a label in which I print the number of times that the button got hit.
From my previous experiences, I know that the button should just say “hey, I’ve been clicked!” without doing anything else and the game manager class should intercept this “event” and add one to the click’s count.
The same game manager should also disable the button once we reach 10 clicks.
In MVVM I’d just work out with the “IsEnabled” property, but now I don’t even know if I can access that button because everything stays on a separate GameComponent and it seems that a GameComponent doesn’t know the other components.
It’s just …a big mess!
Can someone help me sorting out this thing and having a clear vision on how to make a 2D game in Unity?
Thanks ![]()