2013年7月4日 星期四

Prefabs, Resources & Scripts

  • Resources

To add resources such as textures, 3D/2D models, other scripts, simply drag and drop the resources to the destination folder either in Unity or File Explorer.




  • Scripts


To create a script, right click the "Scripts folder" -> create -> and choose "C# Script".
**Rename the file immediately so that the file name is consistent with the script name.




  • Prefabs
Prefabs are pre-made resources/game objects. This is extremely important because it can save any progress you made on any game object. For example, a GUI element can be made into prefab for future use. Let's say we have a progress bar made with appropriate backgrounds, colors, textures, scripts, etc. We can simply drag and drop that element from the Hierarchy Tab to the Prefab folder in Project Tab.

**Recommended that the "Prefab folder" to be made inside the "Resources folder".


沒有留言:

張貼留言