Unity Update() not called

Viewed 1799

Unity update doesnt work at all,

The gameobject is enabled

The script derives from monobehavior

Start() works normally


using UnityEngine;

namespace MouseStuff
{
    public class SetRotation : MonoBehaviour
    {
        public Vector3 offset;
        
        public Transform lookObj;

        private void Start()
        {
            // This works
            print("Start");
        }

        private void Update()
        {
            // This Doesn't work
            print("Update");
            transform.rotation =
                Quaternion.Euler(Quaternion.LookRotation(lookObj.position - transform.position).eulerAngles + offset);
        }
    }
}


0 Answers
Related