Summary
This article first describes two shortcomings of unity3.0 in supporting large-scale game project development: lack of support for modularity and SVN collaboration. Then, the export/import package function provided by unity is analyzed, and a method to use this function with SVN to implement multi-person project collaboration is proposed. For other topics about unity, refer to my other articles.
Unity project collaboration challenges
When using unity to develop game projects, many people usually need to work at the same time. For example, each person is responsible for different scenarios, some are responsible for debugging lighting and rendering, and others are responsible for programming logic. In short, the full package for a person is very small for a slightly larger project. Unfortunately, Unity's support for collaborative projects and large projects can be described poorly.
First, Unity does not have the concept of modular development. We know that modularity is a required practice for developing large projects. For example, when using VC to develop large programs, we can split the program into multiple DLL projects for development, thus reducing the complexity and Compilation Time of a single project. Another example is the development of the Flash program. You can also split the work into multiple flash projects, and finally combine the SWF or SWC generated by each project.
However, up to version 3.0, unity still does not support modular application building methods like DLL or SWC/SWF. For unity, a game is a project. If the game is large and contains many resources, the project will inevitably become bloated and difficult to maintain. Unity also consumes more time to open, refresh, and compile such projects. As a result, many such complaints can be seen on the official Unity Forum. For example, refer to this post.
Second, unity stores the project information in binary format in the library directory, which is called metadata) the information records many key data that constitutes the game (for example, the settings used for Model import and the reference relationship between assets ). However, because the data is in binary format and the storage method is not clear, you cannot modify or merge the data by multiple users when using version management systems such as SVN. Only one person can submit the entire project after the change, and then the next person changes the project. Project Collaboration is severely hindered. Unity officially provides a paid asset
Server, I have never used it. I wonder if I can solve this problem. If we can use some means to make free SVN play a role, why not?
For the first disadvantage of unity, we do not have a good solution for the moment. We can only hope that later versions of unity can provide modular support. (Unity and exitgame have recently announced cooperation to launch a product portfolio for mmog development. Unity will launch a version named Legion that works with photon of exitgame. I guess legion should have better support for large game projects .)
As for the second disadvantage, we can use the unity output/import package (export/import package) function to solve it to a certain extent with SVN.
Use the "export/import package" function to implement project collaboration
The export/import package function of unity is mainly used to implement asset reuse between different projects. For the basic introduction and operation of this function, see the official documentation. This article will further describe the specific performance of this function and how to use this function to implement collaboration among multiple projects.
The import/export Package function has the following features:
- During export, unity records the full path of the exported content in the project and re-creates the corresponding directory structure during import. Therefore, we can easily synchronize directories between projects.
- During export, unity allows you to choose whether to export the dependent content. If you select a check box, the dependent content is automatically added and displayed in the list. For example.
|
|
Do not export Dependencies |
Export Dependencies |
- During import, unity checks whether there are files with identical names and paths in the current project. If yes, it determines whether the modification time is consistent. If yes, it is ignored. Otherwise, a message indicating whether to overwrite is displayed. Note that unity does not care about the new and old files, but simply asks the user whether to overwrite files of the same name in the project with files in the package. For example:
- Most importantly, the Unity output package also contains the metadata corresponding to the asset. Use WinRAR or other compression software to open the. unitypackage file exported by unity, you can see these metadata files, such:
It is precisely because the exported package automatically contains the relevant metadata information that makes up for the defect that SVN cannot manage the data. We can use the two together, achieve the effect of collaboration among multiple people in a project. The specific suggestions are as follows:
- First, use SVN to manage the entire project folder, including the asset and library directories and the following files;
- Managed by the members of the integrated project team and submitted the project updates to the svn Database
- Other collaborators download the latest project files from the svn Database
- The collaborators work on the content they are responsible for and then output the results. Do not select dependencies during output.
- Submit the output unitypackage file to the Integration personnel (through SVN or other methods)
- The Integrator imports the new unitypackage into the project and submits it to the svn database.
If the division of labor, specification, and project directory are well planned, this method can completely achieve simultaneous work of multiple people and improve the efficiency of project development and iteration. If a friend provides better suggestions, he or she hopes to share the suggestions with others. For other topics about unity, refer to my other articles. The content of this article may be further improved.