Whoa, Lua has changed a lot since I looked at it… or at least the contexts I looked at were largely for super-duper-simple stuff, you know, playerHasKey = false; and whatnot.
Studying the blurb above, I would recommend to OP, if you can understand the Lua, just use C#.
If you need Lua (and don’t get me wrong, LUA has its place in terms of being able to live-modify games, something you cannot do with Unity and C# without a LOT of extra pain!), then by all means use Lua.
But to be honest, C# is pretty easy to use as a scripting control for Unity. Remember, you’re not writing the game engine… Unity is the game engine. You are controlling it with your code. Here’s two possibilities:
C# → you write code to control Unity
Lua → you write code to tell C# how to control Unity
I’m a long-time engineer, have no issues picking up any computer language, so take my advice with a grain of salt, but between what I typically do in C# and what I see CodeSmile doing above, there is ZERO difference in complexity or difficulty in comprehension. There’s just different language rules…
Aaaaanyway, learn what you would like but as you go along…
Your programming learning will be (largely) broken into broad areas of knowledge.
You may find these main buckets helpful to organize your learning:
- C# language syntax (organization, structure, grammar, punctuation)
- the .NET API (all the tools that come with C#: lists, dictionaries, file IO, etc)
- the Unity API (everything in the
using UnityEngine; namespace)
Beyond that mechanical stuff comes the interesting stuff: how to actually solve real world problems.
And alongside all of this are things like:
- how to use Unity’s interface
- how assets are imported into the engine
- how Unity manages / loads assets
- how Unity connects / references things
- how scenes and prefabs create objects that run your scripts (the main thing that happens)
You won’t learn it all at once. You will steadily layer on more and more knowledge as long as you are diligent and pay attention what you are doing.
Two steps to tutorials and / or example code:
- do them perfectly, to the letter (zero typos, including punctuation and capitalization)
- stop and understand each step to understand what is going on.
If you go past anything that you don’t understand, then you’re just mimicking what you saw without actually learning, essentially wasting your own time. It’s only two steps. Don’t skip either step.
Step #2 is particularly critical when learning.
If you are unwilling or unable to do Step #2, just ask someone else to do the whole game for you.
ALSO… if you want a way to chip off handy small steps of success, check out how this guy did it:
Imphenzia: How Did I Learn To Make Games: