問題在于不正確的背景回圈。它不是水平滾動圖片,而是隨著時間的推移而扭曲。該腳本可以正確地與另一種材料一起使用,但不能與那個材料一起使用。
它的樣子(右側扭曲):

我有這個背景物件:

這個背景腳本:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class BackgroundLoop : MonoBehaviour
{
public float bgSpeed;
public Renderer bgRend;
void Update()
{
bgRend.material.mainTextureOffset = new Vector2(bgSpeed * Time.deltaTime, 0f);
}
}
謝謝你的幫助。
uj5u.com熱心網友回復:
在專案視窗中選擇紋理。
然后在檢查器視窗中設定
Wrap Mode為Repeat(或Mirror)單擊應用
轉載請註明出處,本文鏈接:https://www.uj5u.com/net/410963.html
標籤:
