Unity3D


Using Device Camera – Unity3D (C#) You can get image from device camera in your scene to use for VR, player portrait etc. It’s pretty easy and tricky. Actually there is no object for device camera. We use the image captured from camera as material and display it on an […]

Using Device Camera – Unity3D (C#)


This function is used for UI buttons mostly but sometimes we need it in game specs. It is implemented easily with mouse enter-exit listeners. We can change color of an object with renderers. Create a cube object and attach this script to it. At first, define 2 colors for standard […]

Change Color on Hover (Mouseover) – Unity3D (C#)


Create Timer – Unity3D (C#) A visible or background timer runs on most games. We will create an easy one which ticks seconds. In this tutorial we don’t use any value such as integer, float etc. We just need a GUI text. Let’s create. Open your project and create a GUIText. […]

Create Timer – Unity3D (C#)



Creating New Game Object at Run Time  – Unity3D (C#) Games not only include driving car or make run a character but also include creating new objects. At this point, “Prefab” thing is included. In that case what is prefab? You can find thousands of definition for prefab but I […]

Creating New Game Object at Run Time – Unity3D ...


Change Camera – Unity3D (C#) Switching between multiple cameras is familiar to everybody from racing games. You can get a view from rear, front, interior etc. It’s easy to implement. If you use two or three cameras, you can assign a key to change camera and make them disabled and […]

Change Camera – Unity3D (C#)


Camera Movement with Mouse – Unity3D (C#) This type of camera controller is mostly used in RTS projects. You can move camera with mouse movement. There are two types of camera movement with mouse: Touch the edges of screen or drag the mouse. In “Drag the Mouse” movement type, player […]

Camera Movement with Mouse – Unity3D (C#)



Snow Effect with Particle System – Unity3D In this tutorial, we will create our own snowing effect in scene. I must say that, you can use “Light Snow” system in standard assets of Unity. We will create a snow effect with it too at the end of this post but […]

Snow Effect with Particle System – Unity3D


Create GUI Menu with 3D Objects – Unity3D (C#) There are 2 ways to create a menu for your game: Unity’s GUI elements or custom objects. We will create a menu with custom 3D objects in this tutorial. This type of menu acts like game scene. So, we need a […]

Create GUI Menu with 3D Objects – Unity3D (C#)


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-6631abcb07a42982736005/] 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#)