Skip to main content
edited tags
Link
Vaillancourt
  • 16.4k
  • 17
  • 56
  • 61
Bumped by Community user
Bumped by Community user
Source Link
Candid Moon _Max_
  • 2.9k
  • 1
  • 22
  • 39

Can't access object parent type if some parent object along the way was in array

Fild Info Method

I use this method to get type of the object the field was declared via reflection. (f.e.) this time it's field at index [5] - activePlaybackAudioArchive.

If along the way the object/objects in hierarchy was placed in array it produces - [1] Array and [2] data[0]. Strangely the [SerializeField] private AudioPlayerData[] _audioPlayerData is the array, why it shows in hierarchy below this variable is unusual to me.

Is there a good way to deal with this problem, or omit the indices like [1] and [2]? Or maybe there is a proper way to get fieldNames that wouldn't include Array like types into path?

Property path