Asset Management Flashcards
What are Prefabs
Prefabs are a special type of component that allows fully configured GameObjects to be saved in the project for reuse
These assets can then be shared between scenes, or even other projects without having to be configured again
What are prefabs good for
Prefabs are good for objects that will be used multiple times such as Characters, platforms, items such as potions or coins/collectable currency, weapons such as bullets and more
Creating prefabs
Prefabs can be created by dragging an object from the hierarchy view/window to the project window.
Prefabs appear blue in the hierarchy window
Scenes in Unity
Scenes contain the objects of your game.
What can scenes be used for
Scenes can be used to create a main menu, individual levels, and anything else. Each unique scene file is like an unique level. In each scene you will place your environments, obstacles, Characters, decorations, and essentially anything you that will be designed and built in your game in pieces
Loading a scene in unity
Scenes can be manually loaded in unity via the project window, assets, scenes
SceneMananger.LoadScene
Declaration
Public static void LoadScene(int sceneBuildIndex, SceneManagement.LoadSceneMode mode = LoadSceneMode.Single);
Declaration
Public static void LoadScene(string sceneName, SceneManagement.LoadSceneMode mode = LoadSceneMode.Single) ;
SceneMananger.LoadScene
Loads the Scene by its name or index in Build Settings.
The Asynchronous LoadSceneAsync avoids pauses or performance hiccups while loading.
UnityEngine.SceneManager needs to be called at the top of the script to use the SceneMananger.LoadScene method
True
Saving a Scene in unity
To save changes to the scene, select Save Scene from the File menu, or hit ctrl/cmd and s for the save shortcut.
This saves the current changes to the scene and does a save project, Ie, everything is saved
Saving the scene
Saving changes saves everything in the scene including, hierarchy gameObjects, scripts, changes made in the inspector and more.
You can also save your unity editor layout
Save the project settings
All the settings for each of the project settings menu items, such as custom input axes, user defined tags or layers, and the physics gravity strength are saved when you Save Project.