Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 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 /
This question was closed Jul 22, 2014 at 12:28 AM by Kiwasi for the following reason:

Too subjective: This is a topic for the forums, and the OP has opened a post there. http://forum.unity3d.com/threads/design-and-naming-patterns-for-unity.257919/

This post has been wikified, any user with enough reputation can edit it.
avatar image
1
Question by Dapperapps · Jul 17, 2014 at 07:23 PM · designdesign-patternsnaming

Design and Naming Patterns for Unity

Hello, I'm a Windows Phone Developer and I have just finished publishing my first Unity game and really loved the tools. I am considering purchasing the pro version and developing higher-scale games.

My question: Coming from a WP background, I am used to following strict Design Patterns in my projects to write simple good code. Namely MVVM (MVC), Façade, factory patterns, singleton... One of the things I struggled a lot with in Unity was, due to how different the system is, coming up with some Design Patterns to adhere to, as to simplify writing my game, minimize bugs, and making unnecessary changes later. I wanted to know what are some of the Naming (script/class names, namespaces...), structural (folders/ script reuse), and Design patterns people use for large-scale Unity projects. Also, should one adhere to using a Façade with many adapters or reusing a single script across many GameObjects? Thanks! -Francisco

Comment
Add comment · Show 2
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 Huacanacha · Jul 17, 2014 at 11:27 PM 1
Share

Whilst it's an interesting question it's too broad, too open ended and too opinion based for the Answers format. You might have better luck on the forums.

One little tidbit: I use a prefab Application Systems object that is added to every scene in my project, with a script that sets DontDestroyOnLoad so it always persists between levels. All application wide system scripts live on this prefab to ensure they will exist and be properly initialised etc no matter what scene you are in, and no matter what scene to start the game from. Remember to save any changes back to the prefab to keep all the scenes up to date. I have a similar top level game object that handles all the Scene specific scripts/controllers etc.

avatar image Dapperapps · Jul 21, 2014 at 11:49 PM 0
Share

Thanks @Hucanacha, I follow a similar principle. Good to know I'm on the right path. Here is a link to the thread for anyone who wants to know more. http://forum.unity3d.com/threads/design-and-na$$anonymous$$g-patterns-for-unity.257919/

0 Replies

  • Sort: 

Follow this Question

Answers Answers and Comments

5 People are following this question.

avatar image avatar image avatar image avatar image avatar image

Related Questions

The name 'Joystick' does not denote a valid type ('not found') 2 Answers

Where to put debug methods and variables 0 Answers

Unity architecture 3 Answers

Starting the Project 1 Answer

Scripts/code sitting outside of individual scenes 2 Answers


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