InitializeBackground









How do I use Initialize Background
Below are practical examples compiled from projects for learning and reference purposes

Featured Snippets


File name: Background.cs Copy
17  void Start () {
18   InitializeBackground ();
19  }
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  }

InitializeBackground 113 lượt xem

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