As a developer, dealing with the framework is unavoidable, such as C # has Ioc,java spring,hibernate,mybatis,structs2 and so on, but unity does not have a mature framework for us to use now, So we can only maximize the organization of our code, so that later maintenance
1. Notes, svn or git log
2. According to the script function write decision script mode, script naming must be easy to understand
such as the scripting of the Independence function (public), write a separate script and then hang it on the object
There is also a global controller that uses singleton patterns, such as Gamecontroller and Inputcontroller,uicontroller
Constant class GlobalManager.cs to control the game's global variables and global methods. Static class mode
3. Large scene to consider the efficiency, when necessary to have a scene to restore
4. Avoid using Gameobject.find and SendMessage, declare object references to show dependencies between scripts, and utilize delegate decoupling
5. Use Coroutine
Unity Framework (Code structure) summary