FullScreenUITexture.cs 394 B

123456789101112131415
  1. using UnityEngine;
  2. using System.Collections;
  3. public class FullScreenUITexture : MonoBehaviour {
  4. void Start () {
  5. Debug.Log("Start");
  6. gameObject.transform.localScale = new Vector3(Screen.width, Screen.height, gameObject.transform.localScale.z);
  7. }
  8. void Update()
  9. {
  10. gameObject.transform.localScale = new Vector3(Screen.width, Screen.height, gameObject.transform.localScale.z);
  11. }
  12. }