I have encountered until now three different serious regressions introduced by 2021.2, all handles related. I am surprised that (seemingly) no one is complaining about it over here. Am I missing something?
I draw a custom position handle for my Temp class. Here is the code for it:
using System.Runtime.CompilerServices;
using UnityEditor;
using UnityEngine;
[CanEditMultipleObjects]
[CustomEditor(typeof(Temp), true)]
public class TempEditor : Editor
{
protected virtual void OnSceneGUI()
{
Temp temp = (target as Temp);
Vector3 position = temp.transform.position;
float handleSize = HandleUtility.GetHandleSize(position);
Vector3 delta = Vector3.one * handleSize;
temp.transform.position = Handles.PositionHandle(position + delta, Quaternion.identity) - delta;
}
}
And here is the actual Temp class:
using UnityEngine;
public class Temp : MonoBehaviour
{
}
If I select an instance of my class while using Unity 2021.2.0f1, both handles appear. If I do the same but using 2021.2.2f1, my custom handle is not displayed.
The other issues are all related to other methods of the Handles class, but for the sake of briefness, I discussed only Handles.PositionHandle. I did report all those bugs to Unity.
You do. 2021.2.3f1. And threads all over the forum about transform handles. Now, I haven’t tried your specific case because I can’t at the moment, but the lights and camera transform handles are fixed, I will assume your custom handle too. If your problem persists after upgrading to 2021.2.3f1, submit a proper bug report.
Thanks a lot, the issue was indeed fixed in 2021.2.3f1.
I thought about it and first read the release note, looking for an entry about a fix for handles, before reporting the bug to Unity, and found nothing.
Thanks again
Only one of the three issues I witnessed is not yet fixed in 2021.2.3f1, which is the position of labels drawn using Handles.Label is different between 2021.1 and 2021.2. I reported the issue to Unity about a week ago, waiting for an answer.
Also, if this might help anyone, I have reported another issue, with no answer neither. It is also a regression introduced in Unity 2021.2, where you get the following message if you open an object selector from inside a custom window, under some circumstances:
GUI Error: Invalid GUILayout state in view. Verify that all layout Begin/End calls match