Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
2
Question by FranzP3 · Nov 02, 2017 at 03:03 PM · unity 5gamegenerationprogrammaticallyautomated

Is it possible to programmatically create a full simple game?

Hello, I would like to know if there is a way to programmatically create every facet of simple games (for example simple physics-based 2D games). I mean, we can for sure generate scripts code, but we do many things from the Unity IDE, from Inspector and so on, without writing code. It would be nice to have a way that allows doing everything via code. In that case, it could even be automated.

Comment
Add comment · Show 5
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Hellium · Nov 02, 2017 at 03:26 PM 2
Share

Yes, it's perfectly possible. You could have only one gameobject in your scene with your "main" script responsible for managing instantiation of other gameobject you attach other scripts and components to it.

avatar image MaxGuernseyIII Hellium · Nov 02, 2017 at 06:48 PM 1
Share

$$anonymous$$y finger was poised over "convert to answer" before I realized it was you. I have to assume you have a reason for not having this be an answer but I cannot deduce what it is.

avatar image FranzP3 Hellium · Nov 03, 2017 at 10:36 AM 0
Share

Hi Hellium, thanks for your reply. I still need to use UnityEditor in order to create the "main" object and attach the "superscript" to it. Am I right?

avatar image Hellium FranzP3 · Nov 03, 2017 at 12:26 PM 1
Share

Indeed, but I guess you could do this once, for all your projects. Then, you could duplicate your "base project" for other ones.

But, I don't see what you are trying to achieve and managing your assets will be very, very hard I think. You can't reference 3D models or textures/sprites if without the editor (except if you use the Resources folder, but it's not advised to intensively use this folder)

Show more comments

3 Replies

· Add your reply
  • Sort: 
avatar image
3

Answer by MaxGuernseyIII · Nov 02, 2017 at 06:57 PM

The answer to the question you asked, the way you asked it is "nearly", as @Hellium indicated in his answer-shaped comment. There are plenty of reasons why someone might want to do this. Not the least of which might be "I'm an indie developer and I'm comfortable with programming as the means of expressing my ideas". You might even be able to hook into Unity's compiler pipeline to circumvent even the need for that one game object. I haven't checked to be sure but you can do a lot of interesting things with extensions like that.

@jummatim is definitely right that collaboration with non-programmers is enabled by breaking your code down into smaller pieces (MonoBehaviour implementations) with visible, intentional revealing parameters.

It also just plain makes sense, in certain ways and for certain kinds of games, to use the Unity editor, divide your game into meaningful instances of GameObject, and divide the "surface area" of your code into meaningful implementations of MonoBehaviour. There's plenty you get for free from the Unity editor and it's a quasi-domain-aware editor, so it's really good at making game-related editor operations easy.

I, too, had the impulse to do everything programmatically because of my background but, now that I'm accustomed to doing most things in Visual Studio and the few things that the Unity Editor is really good at in Unity, I can't imagine going back to trying to do everything.

Comment
Add comment · Show 3 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image FranzP3 · Nov 03, 2017 at 10:42 AM 0
Share

Hi $$anonymous$$ax, thanks for your reply. Where I can find more on "You might even be able to hook into Unity's compiler pipeline to circumvent even the need for that one game object." It sounds like the cherry on the cake.

avatar image MaxGuernseyIII FranzP3 · Nov 03, 2017 at 05:32 PM 0
Share

I don't know a lot about it. It seems like there's some compiler or pre-compile pipeline that Nested Prefabs leverages to do what it does. You might reach out to the developer of that product and ask them for a pointer to API documentation.

It looks like most of it is in the UnityEditor.Build namespace. For instance, IPreprocessBuild.

avatar image FranzP3 MaxGuernseyIII · Nov 04, 2017 at 05:18 PM 0
Share

O$$anonymous$$. Thanks a lot $$anonymous$$ax

avatar image
1

Answer by jummatim · Nov 02, 2017 at 03:41 PM

@FranzP3
Good day, sir!

From what I understood from your question - you prefer working in IDEs more, than in UnityEditor. It is fair enough and indeed possible to automize all your tools to the level of insanity and be able to set all the interactions, transitions and visuals directly from code. The difficulty appears when you need to give access to your tools to other collaborators. I bet artists, level designers, qa guys or even your friend would love to tweak variables and see the effects immediately on runtime, not necessarily having to poke you or other team members to change a color of the button. Other than that, there are some complex areas such as particle effects, shaders and even UI that make you realise using pre-made assets as a small team is a better solution than writing shaders on your own.

Possible, but I would recommend against that approach. Good question, love the abstraction you've managed to put it in.

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image MaxGuernseyIII · Nov 02, 2017 at 06:47 PM 0
Share

Any chance you'd be willing to edit this so that your prose isn't formatted as code?

avatar image
0

Answer by Stadob · Nov 02, 2017 at 06:07 PM

You can always create your game from scratch without using unity... there are plenty of frameworks which you can use. For c# i would recommend MonoGame

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image FranzP3 · Nov 07, 2017 at 09:39 AM 1
Share

Hi hm69, I need to use Unity for my purposes :)

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

171 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Facebook Integration With Unity3D 0 Answers

How to implement customized character into my next scene? 0 Answers

Does any one know of a tutorial for making games like eve online ? 0 Answers

(Game Build) Validating files and updating to latest version 0 Answers

2d game for my first unity project. 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges