Texture.wrapMode 循环模式

var wrapMode : TextureWrapMode

Description描述

Wrap mode (Repeat or Clamp) of the texture.

循环模式(重复或强制拉伸)

Set the texture to clamp at the borders to avoid warping artifacts with TextureWrapMode.Clamp . Or tile the texture with TextureWrapMode.Repeat

在贴图边界以设置贴图的重复模式的方式避免不真实的情况,使用强制贴图边界拉伸 TextureWrapMode.Clamp 或者贴图重复平铺 TextureWrapMode.Repeat

using UnityEngine;

using System.Collections;



public class example : MonoBehaviour {

	public void Awake() {

		renderer.material.mainTexture.wrapMode = TextureWrapMode.Clamp;

	}

}
renderer.material.mainTexture.wrapMode = TextureWrapMode.Clamp;
Page last updated: 2011-5-25