- Home /
How do I use png image as a loading Scene in unity3d in C#
I am not using the loading bars . I want to use a png image for my loading scenes. I have some code here :
using UnityEngine;
using System.Collections;
using UnityEngine.SceneManagement;
using UnityEngine.UI;
public class djsi : MonoBehaviour {
public png;
// Use this for initialization
void Start () {
img.gameObject.SetActive(false);
}
// Update is called once per frame
IEnumerator abc()
{
img.gameObject.SetActive(true);
yield return new WaitForSeconds(1.5f);
SceneManager.LoadSceneAsync("scene1");
}
void Update () {
}
}
Answer by Dream_in_code · Sep 12, 2016 at 08:39 AM
create a scene with your picture in it. Then in the build setting drag and drop the scene in order according to your game design.
make an empty gameobject and attach the script to it.
void Awake()
{
sceneLoad();
}
public void sceneLoad()
{
StartCoroutine("waitTime");
}
Ienumenator waitTIme()
{
scenemanager.loadscene("give the name of your scene which has the loading image");
yield return new waitforsceonds(//time you want to wait//);
scenemanager.loadscene("give the name of your main scene name");
}
Your answer

Follow this Question
Related Questions
How to select scene based on device screen size? 1 Answer
Can you load a level through using PlayerPrefs? 0 Answers
How do I load a scene by walking into a trigger box and pressing E or Enter? 1 Answer
Load level on button press not working - new scene loads instantly without pressing key 1 Answer
Loading scene in background? 1 Answer