Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ All package updates & migration steps will be listed in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [4.3.2] - 2025-01-24
- Disable the Unity LTS2020 property drawer recursive property crash workaround. It appears to work in LTS2022.

## [4.3.1] - 2025-01-06
### Fixed
- `ReadOnlyListContainer` now throws `IndexOutOfRangeException` when accessed out of range.
Expand Down
10 changes: 7 additions & 3 deletions Editor/Editor/ParameterReferenceDrawer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,10 @@ public class ParameterReferenceDrawer : PropertyDrawer
* with in inner list also called _rewards. The recursive calls to to EditorGUI.PropertyField and
* EditorGUI.GetPropertyHeight cause issues.
*
* This was identified in LTS2020 (TBD if it's still an issue in newer editor versions)
* This was identified in LTS2020. In LTS2022, it appears to work without crashing. If you find yourself
* crashing, re-enable this workaround by flipping this bool.
*/
private const bool ShouldWorkAroundRecursivePropertyNameBug = false;
private static readonly Stack<string> s_arrayPropertyNames = new();
private static Object s_firstTargetObject;

Expand Down Expand Up @@ -154,7 +156,8 @@ private float InnerInspectorHeight(ParamProperty paramProperty, SerializedProper
children = false;
// don't draw class file
if (prop.name == "m_Script") continue;
if (prop.isArray && s_arrayPropertyNames.Contains(prop.propertyPath))
if (ShouldWorkAroundRecursivePropertyNameBug &&
prop.isArray && s_arrayPropertyNames.Contains(prop.propertyPath))
height += EditorGUIUtility.singleLineHeight;
else
height += EditorGUI.GetPropertyHeight(prop, new GUIContent(prop.displayName), true);
Expand Down Expand Up @@ -291,7 +294,8 @@ private bool DrawGUI(Rect position, SerializedProperty property, ParamProperty p
if (prop.name == "m_Script") continue;
float height;
var propLabel = new GUIContent(prop.displayName);
if (prop.isArray && s_arrayPropertyNames.Contains(prop.propertyPath))
if (ShouldWorkAroundRecursivePropertyNameBug &&
prop.isArray && s_arrayPropertyNames.Contains(prop.propertyPath))
{
height = EditorGUIUtility.singleLineHeight;
var style = new GUIStyle(GUI.skin.label);
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "com.pocketgems.scriptableobject.flatbuffer",
"version": "4.3.1",
"version": "4.3.2",
"displayName": "Scriptable Object - FlatBuffer",
"description": "Seamless syncing between Scriptable Objects and CSVs. Scriptable Object data built to Google FlatBuffers for optimal runtime loading & access.",
"unity": "2021.3",
Expand Down
Loading