StarTextureScript.cs 345 B

1234567891011121314151617
  1. 
  2. using System;
  3. using UnityEngine;
  4. namespace SpacePlanet
  5. {
  6. public class StarTextureScript : MonoBehaviour
  7. {
  8. public void LateUpdate()
  9. {
  10. var cameraY = Camera.main.transform.position.y;
  11. var cameraX = Camera.main.transform.position.x;
  12. gameObject.transform.position = new Vector3(cameraX, cameraY, 20f);
  13. }
  14. }
  15. }