GetTextureOffset









How do I use Get Texture Offset
Below are practical examples compiled from projects for learning and reference purposes

Featured Snippets


File name: Background.cs Copy
28  void InitializeBackground(){
29   mat = GetComponent ().material;
30   offset = mat.GetTextureOffset ("_MainTex");
31   float height = Camera.main.orthographicSize * 2f;
32   float width = height * Screen.width / Screen.height;
33
34   transform.localScale = new Vector3 (width, height + 1, transform.position.z);
35  }

GetTextureOffset 133 lượt xem

Gõ tìm kiếm nhanh...