What's New in Unity 2022
Everything I think you should know about Unity 2022.3 when migrating your VRChat projects from 2019.4.
- Index
- All Arrays And Lists Are Now Reorderables by Default
- Properties Window
- Set Any GameObject as Default Parent
- Undo History
Index
What's New in Unity 2022
All Arrays And Lists Are Now Reorderables by Default
Set Any GameObject as Default Parent
Upcoming Pages
- Hierarchy / Create Empty Parent
- Prefab Editing in Context vs. Isolation
- Search
- Transform Constrained Proportions
- Class Icon Attribute
- UI Image Raycast Padding
- Hierarchy / Copy, Cut & Paste
- Property Copy / Paste
- Material Slot Pinging
- Ragdoll Creator
- Lighting Settings Asset
- Splines
- Collider Contacts
- Collider Layer Overrides
All Arrays And Lists Are Now Reorderables by Default
What are reorderables?
As soon as you open up Unity 2022.3, you may start to notice that all arrays and lists look a little different from how they used to in 2019.4.
This is because by default, all arrays and lists are now "reorderables", meaning that you can reorder items by dragging them. Many advanced creators have already been using reorderable lists before by accessing the Unity's internal APIs, but now they are available by default to everyone with zero code.
Can I revert the arrays to how they used to be?
Absolutely! In order to disable reorderable arrays or lists, all you have to do is add the NonReorderableAttribute above your array:
[NonReorderable]
[SerializeField, FieldNullWarning(true)]
private Image[] panelColorExampleImages;
[NonReorderable]
[SerializeField, FieldNullWarning(true)]
private TextMeshProUGUI[] contentColorExampleTexts;
[NonReorderable]
[SerializeField, FieldNullWarning(true)]
internal GameObject[] examplesToDestroyOnBuild;
By using the attribute, all of your arrays should be back to how they used to be in 2019.4:
PUBLIC ASSET AUTHORS - PLEASE NOTE!
Migration to Unity 2022.3 may take even up to a year or more, so if you are a developer of publicly distributed assets, please note that NonReorderableAttribute is not available in Unity 2019.4!
For publicly distributed scripts you can use the following define for ensuring that the end users are not running into compiler errors when attempting to import your scripts into their projects still using Unity 2019.4:
#if UNITY_2020_2_OR_NEWER
[NonReorderable]
#endif
[SerializeField]
private GameObject[] myArray;
Properties Window
Unity 2022.3 allows you to open an isolated inspector for any GameObject's or Component's inspector.
If you want to open an isolated inspector for a Component, navigate to the component's context menu (three dots), and click Properties...
If you want to open an isolated inspector for a GameObject, navigate to the inspector's context menu (three dots), and click Properties... - OR - right click the GameObject in hierarchy and click Properties... at the very bottom.
Set Any GameObject as Default Parent
How to set a GameObject as default parent?
In 2022.3 we have a new option for setting any GameObject in the scene as the default parent, meaning that any new prefab we drag into the scene will be parented to that object by default.
How to clear the default parent for the scene?
If you want to clear the default parent of your scene, all you have to do is navigate back to the same menu item as before, which now says "Clear Default Parent"
Undo History
In 2022.3 we now have a dedicated Undo history window for quickly reverting changes without having to spam CTRL + Z repeatedly.
You can open the Undo History window by navigating to the Top Right Corner of your Unity Editor and pressing the little clock icon with an arrow around it:
You may alternatively open it from your toolbar under Edit > Undo History:
Or just press the keybind for it: CTRL + U.