在摄像机前挂一个Image,失活,当跳转场景时激活
并且上面挂Canvas Group 组件
image Color属性:
代码:
//加载场景 if (isLoad == true) { loadingImage.SetActive(true); timer_load += Time.deltaTime * 0.3f; loadingImage.GetComponent<CanvasGroup>().alpha = timer_load; if (timer_load >= 1) { timer_load= 1; SceneManager.LoadScene("shaked");//跳转到某个场景 } }