My next project will use Unity 5.6. It will be a game and that will leverage AssetBundle for remote scenes loading. New scenes will be incrementally added afterward. Therefore I hope I won't use a too bad structure that need to be changed a lot in the later stage of the project. Is there a standard/recommended directory structure for Unity projects?
相关问题
- Unity - Get Random Color at Spawning
- Unity3D WebGL Headless not rendering
- Unity3D loading resources after build
- Load Image from Stream/StreamReader to Image OR Ra
- Unity3D - Build Failed because of “[Unity] ERROR:
相关文章
- Programmatically setting and saving the icon assoc
- Omnisharp in VS Code produces a lot of warnings ab
- Call non-static methods on custom Unity Android Pl
- How can a game created in Unity can run on an Andr
- How to add Persistent Listener to Button.onClick e
- Placing an object in front of the camera
- Connecting Unity3d Android application to ActiveMQ
- How to mimic HoloLens 2 hand tracking wIth Windows
At the end of the day, it comes down to whatever works the best for you and makes the most sense for the project. Working on small solo projects, I've found that keeping a simple folder structure separating asset types has worked well to keep things organized (Textures, Scripts, Prefabs, Sprites, etc). Another popular method is to organize by object type:
In my experience, organizing by Scene has generally not ended up working out well, especially in the case where assets are shared between scenes - stuff tends to get lost.
I suggest taking some time to mess around with your organization and see what feels right for you, especially if this is your first unity project. Moving files around after you start will not break associations in the inspector, assuming you are not searching through directories in your scripts.
If you need more help deciding, take a look at some of the links below. Link 3 in particular has a pretty lengthy discussion on this topic.
Unity actually does encourage the following structure:
This is due to the object oriented way in which Unity thinks: Each folder contains only the information of a certain type needed for an asset. This is especially visible when you look at the Special Folders in Unity.
Even when you look at they build up their standard assets you will notice this structure. I hope you won't have a lot of scenes which do not share any assets with the other scenes, because this would be a very big waste of resources.
What is notable in the Standard Assets, is that in their demo, they have a folder called
Menu
which contains its own Scripts, Prefabs and Sprites folders.So I suggest you do the following (note: This is my opinion):