Script only Unity tutorial.

I don’t want to get into a debate about the rights and wrongs of this approach but the Editor is not for me. For me personally It is the reason I’ve not used Unity sooner.

I have seen posts that a code only approach is possible :
(Programatically creating entire Unity games - Questions & Answers - Unity Discussions)
but I am struggling to find a good tutorial or example project that doesn’t use the editor.

I just want to start from monoDevelop (or similar) and code. Is there such a tutorial to help me get started developing using Unity in this way?

Welcome to the forums!

With this kind approach you are bypassing one of the core strengths of Unity. That’s why you most likely won’t be able to find tutorials about it.
It is not clear to me what exactly you have in mind. Do you want to start empty and create everything programmatically? Theoretically, that should be doable. As it doesn’t make much sense to do it like that in Unity, you will most likely not find tutorials about it.

Which use case do you have in mind? Or why do you want to develop like that? I am not asking this to start a discussion. This is simply meant to get a better understanding, with the goal to give a better answer.

No. Using a tool in a way that is counter to its design usually requires learning how to do so on your own. I recommend starting the same way that everyone else does. Unity’s official tutorials may not cover the way you want to use Unity, but the concepts you will learn are the same regardless of how you use it.

You cannot completely avoid using the editor. Each scene requires at least one GameObject with at least one script component attached to it. Additionally you will use the editor to import and set up your assets.

+1 to Ryiah and Dantus’ statements.

That said, code-only isn’t really that hard, assuming you know what you’re doing, ya know, actually writing code. Any script files you create, remove the inheritance from MonoBehavior and they act as class files in any other application. And better yet, Unity automatically includes them in compilation for you. You will need at least one script attached to a game object to act as your entry point, as Ryiah stated.

I also want to comment on how amazingly long you’ve been a lurker here. Congrats on finally posting!

1 Like