Occlusion Culling Tutorial – Unity3D You can use occlusion culling to hide unnecessary object for camera. You don’t need the object behind the camera. So, hide it! !!(This property is free only for Unity3D 5.0 or newer versions.)!! At first, create a terrain and a cube. Edit the static choices […]

Occlusion Culling Tutorial – Unity3D

Creating UI Button – Unity3D There are 2 options to add a button in Unity. You can use UI elements of Unity or you can create your own button with a game object. We will inspect default UI elements of Unity in this post. With 4.6 edition, Unity helps us […]

Creating UI Button – Unity3D

Drag Object with Mouse – Unity3D (C#) It’s too easy and quick to drag an object with mouse. Just use OnMouseDown() and OnMouseDrag() functions. [crayon-599886fed7a90097241139/] Save script and attach to object. That’s all!   ©Coffee Break Codes – Drag Object with Mouse – Unity3D (C#)

Drag Object with Mouse – Unity3D (C#)

Save and Load Game – Unity3D (C#) People thinks that save and load functions are a little bit complicated in game development. We will use 2 types of game saving and game loading in Unity3D and you will get that it is not as complex as you think. We use […]

Save and Load Game – Unity3D (C#)

 Add Animation – Unity3D Animations are used for animating any movement or stand position of an object. Some game objects in asset store have their own animation as you know but you can add animation even for a single cube. You can change rotation or position of a 3D object to […]

Add 2D Animation – Unity3D

Move Object to Mouse Click Position – Unity3D (C#) No matter 2D or 3D, we use same method to move an object to mouse click position. We need to get mouse click position on ground or whatever, and move object to this position. Create a plane and a cube. We […]

Move Object to Mouse Click Position – Unity3D (C#)

Move Object with Lerp – Unity3D (C#) You can use Lerp function to move an object automatically. You just need start and end points. Object moves from start to end in time. You can assign start point and end point manually in script or with mouse click. These points may […]

Move Object with Lerp – Unity3D (C#)

Move, Zoom and Rotate Camera – Unity3D (C#) Move: It is same as moving character. Just use keyboard buttons and move camera with a float speed variable. [crayon-599886fed8d1a060658125/]   Zoom: To zoom with scroll wheel, we need scroll wheel input to zoom in or zoom out. [crayon-599886fed8d22541548913/]   Rotate: I will […]

Move, Zoom and Rotate Camera – Unity3D (C#)

Add Sound Effect – Unity3D (C#) You can add sound effects for all actions in your project. For example, when your character jumps or collides another object or just click on a button, you can call your sound effect. At first, add an “Audio Source” to your scene. As you […]

Add Sound Effect – Unity3D (C#)

Tile-Based Ground – Unity3D (C#) To create a tile-based ground, we need a simple matrix system. A (row X column) matrix will take a plane texture and draw it in each cell.   [crayon-599886fed975b552089706/] ©Coffee Break Codes – Tile-Based Ground – Unity3D (C#)

Tile-Based Ground – Unity3D (C#)

Grid System – Unity3D (C#) Grid system is used mostly in RTS games. Your characters or buildings move on grids. You need a matrix to create a grid system. [crayon-599886fed9a52026353068/]   ©Coffee Break Codes – Grid System – Unity3D (C#)

Grid System – Unity3D (C#)

Mouse Click on Game Object – Unity3D (C#) There are two ways to perform click function on a game object: 1- Create and attach a script to the target object. Write this function in it. [crayon-599886fed9c3b754253525/]   2- You can use Physics.Raycast to detect target with ray. You must write […]

Mouse Click on Game Object – Unity3D (C#)