Unity 3d Progress Bar

Objective

You can create circular progress bar in unity for your video game. Here is a simple example of how to achieve circular progress bar in unity.

Use the ProgressBar Pack from upln on your next project. Find this GUI tool & more on the Unity Asset Store. Circular progress bar in Unity 3D - UnityScript. Saving the progress of a Unity game in isolated storage. Unity progress bar on button click to load another scene. Unity3d progress bar. Show progress bar in Unity C# WWW. Unity: Progress Bar rounding to nearest whole number. Put this script in an Editor/ folder and you'll now have the ability to add a Unity IDE.cancelable. progress bar to any enumerable expression. Anytime you have a really time-consuming 'foreach' in your code, you can now throw in a quick progress bar anywhere something is being enumerated. By Matt 'Trip' Maker, Monstrous Company:: http. Description Makes a progress bar. Value goes from 0 to 1, where 0 means 0% of the bar filled and 1 means the bar is at 100% fully filled Progress bar in an Editor Window.

In this example we simply use Below steps to create a circular Progress bar. You can make it look like as per following steps:

Step 1 Basic Setup

First, Create a Quad in Hierarchy.

In inspector of Quad, use Transparent/ CutOut/ VertexLit or Unlit/ TransparentCutOutshader that can switch between two textures in Material.

Unity 3d Progress Bar

Add Appropriate texture (must be alpha cut out texture).

Now add below script to quad in hierarchy.

Unity 3d Progress Bar

Step 2 Code Sample

Code for circular progress bar:

Unity 3d progress bar template

Note

To use this ProgressBar, set the value of timetoComplete variable as a number of seconds (In the above example we assume that timetoComplete=3) that’s required to complete one entire cycle.

Step 3 Output

A Video of above code you can find here:

I hope you found this blog helpful while Creating Circular Progress bar in Unity. Let me know if you have any questions or concerns regarding Unity, please put a comment here and we will get back to you ASAP. Got an Idea of Game Development? What are you still waiting for? Contact us now and see the Idea live soon. Our company has been named as one of the best Game Development Company in India.

free. download full Source Code!!!

I'm Dipak Sorathia and I've been working as 3D game developer for over 1 year on Unity3D game engine. Strong at create a great experience in games through cinematography and visual effect.

In this tutorial I will be showing how to make a circular/radial progress bar in Unity 3D.

So let’s begin!

Steps

For this we will need a circular image with a transparent background. (You can download one from here)

  • Import the image into your project and change its Texture Type to “Sprite (2D and UI)”
  • Create new Canvas (GameObject -> UI -> Canvas)
  • Right click on Canvas object -> UI -> Image
  • Assign a circle sprite to Source Image and change its color to red
  • Change the Image Type to “Filled” and Fill Method to “Radial 360” (This will show another variable called Fill Amount which controls how much of the image is visible along the circle)
  • Duplicate the image, change its color to white and Image Type to “Simple”
  • Move the duplicated Image inside the first Image
  • Change the first image size (the one with Filled Image type) to something bigger (ex. width: 135 height: 135)
  • Create new Text (Right Click on Canvas -> UI -> Text)
  • Change its alignment to middle center
Bar

Unity 3d Progress Bar Download

  • Also change the text height to 60 to be able to fit the loading text

Lastly we will create a script that will transform the progress value to the Image

  • Create new script, call it “SC_CircularLoading” and paste the code below inside it:

SC_CircularLoading.cs

Unity 3d Progress Bar Timer

  • Attach SC_CircularLoading script to any object and assign its variables (Loading Image should be the image with Radial Fill type and Loading Text should be a text that will show the progress value)
  • Finally press Play and move the Loading Progress slider. Observe the loading image gradually fill:

Progress Bar Android


Source link