Skip to content

Instantly share code, notes, and snippets.

@aras-p
Created June 20, 2023 15:42
Show Gist options
  • Save aras-p/5eb2b9ef58f3af6c6389b12bd2ae6853 to your computer and use it in GitHub Desktop.
Save aras-p/5eb2b9ef58f3af6c6389b12bd2ae6853 to your computer and use it in GitHub Desktop.
Unity 2022.3 enum bug
// just attach this to an empty game object.
// Unity 2021.3: fine
// Unity 2022.3: displays PVRTC_RGBA2 value.
// This happens with enums that contain some Obsolete values.
//
// Looks like a regression since inspector got changed to UIToolkit,
// the code inside UIToolkit enum property field does not handle
// obsolete entries correctly. And compared to IMGUI enum field,
// also loses any potential enum localization.
using UnityEngine;
public class Test : MonoBehaviour
{
public TextureFormat m_TexFormat = TextureFormat.BC7;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment