“This is the 17th day of my participation in the Gwen Challenge in November. Check out the details: The Last Gwen Challenge in 2021.”

👉 About the author

As we all know, life is a long process of constantly overcoming difficulties and reflecting on progress. In this process, there will be a lot of questions and thoughts about life, so I decided to share my thoughts, experiences and stories to find resonance!!

Focus on Android/Unity and various game development tips, as well as various resource sharing (websites, tools, materials, source code, games, etc.)

Welcome to pay attention to the public account [Mr. Empty name] for more resources and communication!

👉 premise

Why specification/specification purpose

Unity development usually requires parallel development with 3D, art and design, and frequent communication, and large projects may be multi-person development, so a good project specification can improve development efficiency. Many advantages:

  • 1. Convenient code communication and fragmentation maintenance, so that everyone can read the code clear, maintainable;
  • 2. The management efficiency of the early-stage development team is high, and the division of labor is clear, which effectively avoids confusion in the back and prevents malicious overtime work;
  • 3. Fast update/maintenance, clear logic and clear project;
  • 4. Although the standard code may not bring high performance, but must be elegant, pleasing to the eye, not boring to improve the mood of pleasure;

Good practices are important, and no one wants to work in a “messy” environment

👉 Practice

😜 File name specification

  • 1. Big hump nomenclature, capitalizing the first letter of each word, and showing the functional meaning of changing files. For example, if you have a ModelHand, you can call it ModelHand
  • 2. For files at the same level and with the same name, use underscores (_) and numbers to distinguish them, for example, Scene_01, Scene_02, Scene_03, Scene_04
  • 3. The names of all resources that belong to the same whole should be the same as possible. For example, the HandModel contains textures and scripts, and it should be named ModelHand, ScriptHand TexturesHand or HandModel, HandScript, HandTextures
  • 4. Naming as far as possible in English, if many people cooperate with English obstacles, use pinyin, but must be fully spelled and in line with the big camel name. For example, flashlight model: ShouDian, don’t come to SD, let a person misunderstand into SD card or silly egg, very not recommended abbreviation.

😜 Resource specifications

  • 1. Name the file according to the above naming conventions
  • 2. Use THE PNG format as much as possible
  • 3 pictures should not be too much pursuit of effect, in the premise of not affecting the vision can be smaller
  • 4. TinyPng software can be used in advance for image compression, I have also strongly recommended in Android, super magic device, remarkable effect
  • 5. The coordinate mode of multi-party cooperation has been agreed in advance. A unified coordinate system can help better viewing the model effect, otherwise it will lead to chaotic scenes
  • 6. The number of screens on a mobile device should be 300-1500, and that on a PC should be 1500-4000. The number of screens on the entire screen should be less than 7500
  • 7. The size of the map is 2 ^ N, the maximum is 1024*1024, special treatment will be carried out in special cases

😜 code specification

  • 1. Hump nomenclature, and the name should be expressed in accordance with her meaning, or English or frequency, strongly opposed to abbreviations
  • 2. Write notes as detailed as possible for easy maintenance and later reference
  • 3. Do not use coroutines, declare variables, or create classes in frequently updated functions (Update/OnGui), which may affect performance
  • 4. Add exception capture to codes that may cause functional failure and affect business processes for easy debugging
  • 5. Try to put time-consuming tasks that require large computation into sub-threads to avoid congestion
  • 6. Other specifications to be added

👉 other

📢 author: Kom and Kom in Kom

📢 reprint instructions – be sure to specify the source: Zhim Granular’s personal home page – column – Nuggets (juejin. Cn)

📢 welcome to like 👍 collect 🌟 message 📝