Manual     Reference     Scripting  
  
Scripting > Enumerations > TextureWrapMode   
  • Menu
  • Overview
  • Runtime Classes
  • Attributes
  • Enumerations
  • Editor Classes
  • Attributes
  • Enumerations
  • History
  • Index
  • TextureWrapMode
  • All Members
  • Values
  • Clamp
  • Repeat

TextureWrapMode.Repeat  

TextureWrapMode.Repeat

Description

Tiles the texture, creating a repeating pattern.

When UVs are outside of the 0...1 range, the integer part will be ignored, thus creating a repeating pattern. See Also: Texture.wrapMode, texture assets.

JavaScript
renderer.material.mainTexture.wrapMode = TextureWrapMode.Repeat;

using UnityEngine;
using System.Collections;

public class example : MonoBehaviour {
void Example() {
renderer.material.mainTexture.wrapMode = TextureWrapMode.Repeat;
}
}

import UnityEngine
import System.Collections

class example(MonoBehaviour):

def Example():
renderer.material.mainTexture.wrapMode = TextureWrapMode.Repeat