vrchat-community / UdonSharp

A compiler for compiling C# to Udon assembly
https://udonsharp.docs.vrchat.com
MIT License
463 stars 50 forks source link

2D arrays are no longer displayed in inspector. #57

Closed noritama-vrc closed 1 year ago

noritama-vrc commented 1 year ago

Describe the bug in detail: Previously, 2D arrays with public or [SerializeField] attributes were displayed in inspector in UdonSharp, but they are no longer displayed in UdonSharp now.

Image 1:Code スクリーンショット (370)

Image 2:inspector of v0.20.3 スクリーンショット (371)

Image 3: inspector of v1.0.0b9 スクリーンショット (372)

Provide steps/code to reproduce the bug:

  1. Descrive 2D arrays with public or [SerializeField] attributes and attache to UdonBehaviour
  2. See Inspector(always occuer)

Expected behavior: 2D arrays should be display in inspector. The Udon gimmick that allows users to set parameters in a 2D array is no longer available, and should be fixed.

Additional Information: I wrote same issue in VRChat canny. https://feedback.vrchat.com/vrchat-udon-closed-alpha-bugs/p/2d-arrays-are-no-longer-displayed-in-inspector

MerlinVR commented 1 year ago

This is intentional as they wouldn't serialize with just [SerializeField] anymore due to Unity's serializer not handling jagged arrays. If you mark the fields with [OdinSerialize] instead they should still show up in 1.0. They will show up at the bottom of the inspector list due to how compatibility is handled.