Has something changed in Unity 6 or 2022 related to transform.right and transform.up?

Hi there,
In my previous 2D project built with Unity 2021, I frequently used the following script to rotate an object toward another object:

transform.right = other.transform.position - transform.position;

However, I’ve noticed that in Unity 6, this method often doesn’t work. Instead, I now need to use the following code:

Vector2 direction = (other.transform.position - transform.position).normalized;

float angle = Mathf.Atan2(direction.y, direction.x) * Mathf.Rad2Deg;

transform.rotation = Quaternion.Euler(new Vector3(0, 0, angle));

Has something changed in Unity 6 or 2022 that affects this behavior? Could there be a specific setting causing this issue, or is it potentially a bug?

My Unity version: 6000.0.3f1 for Mac silicon version

Nobody would change such basic functionality. I mean, how could it be changed because it has such a simple specific purpose.

Just sounds like you need to debug it. Look at what you get from a simple test in both versions to ensure you’re not seeing other project differences, which you likely are.

This was my initial thought too, I must be doing something wrong. However, since this issue occurs in multiple places, I suspect that either some settings have changed on my end, or this might be a bug.