fix(Extensions): GetPositionAndRotation now excluded for 2022.0 or newer

- Some patch versions of 2021.3 don't have it, some do...this is safer.
- Works as expected in 2021.3.39 and 2022.3.32
This commit is contained in:
MrGadget 2024-06-12 14:00:52 -04:00
parent 440b61429b
commit fe93f4e870

View File

@ -101,8 +101,8 @@ public static void Clear<T>(this ConcurrentQueue<T> source)
} }
#endif #endif
#if !UNITY_2021_3_OR_NEWER #if !UNITY_2022_0_OR_NEWER
// Unity 2021.2 and earlier don't have transform.GetPositionAndRotation which we use for performance in some places // Some patch versions of Unity 2021.3 and earlier don't have transform.GetPositionAndRotation which we use for performance in some places
public static void GetPositionAndRotation(this Transform transform, out Vector3 position, out Quaternion rotation) public static void GetPositionAndRotation(this Transform transform, out Vector3 position, out Quaternion rotation)
{ {
position = transform.position; position = transform.position;