- Home /
Loading another scene - Glitches?
Hello Everybody!
I've got a script which works pretty good (you can see it below). If the player touches the object it is attached to, it will load the wanted scene at the wanted position. BUT somehow there is a little glicth when it does so. It's more a graphical glitch. Because you can see how the game loads the scene and warps the player. And that is not very good. How can I adjust the code so it is not viewable for the player how the game loads the scene? Thanks in advance.
using System.Collections; using System.Collections.Generic; using UnityEngine; public class Load : MonoBehaviour { public string sceneName; public float xPosition; public float yPosition; public GameObject bullet; void OnCollisionEnter2D(Collision2D col) { if (col.transform.tag == "Player") { Application.LoadLevel (sceneName); col.transform.position = new Vector3 (xPosition, yPosition); var tBullet = Instantiate(bullet, gameObject.transform.position, bullet.transform.rotation) as GameObject; } } }
Try to implement a smooth scene transition with a GUI, there are a lot of videos showing how it's done
Your answer
![](https://koobas.hobune.stream/wayback/20220612165057im_/https://answers.unity.com/themes/thub/images/avi.jpg)