Pages

Thursday, 12 October 2017

Updating our C# code

We need to drop boxes until all available box are done. The easiest way to do this is by using prefabs. Prefabs are reusable game object which you can use on multiple scenes, multiple times maintaining same properties.

Lets create prefab for our drop box. Create folder inside assets folder and call it Prefabs. Drag and drop our box inside this new folder. Notice the game object is highlighted in blue to show it is an instance of a prefab (object oriented programming knowledge needed to understand what an instance is - copy of game object in simple terms).