LookAtMainCamera.cs 381 B

1234567891011121314
  1. using UnityEngine;
  2. namespace Mirror.Examples.AdditiveLevels
  3. {
  4. // This script is attached to portal labels to keep them facing the camera
  5. public class LookAtMainCamera : MonoBehaviour
  6. {
  7. // LateUpdate so that all camera updates are finished.
  8. void LateUpdate()
  9. {
  10. transform.forward = Camera.main.transform.forward;
  11. }
  12. }
  13. }