You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've encountered an issue where attributes applied to list fields do not work as expected for each element within the lists. Specifically, attributes like [Required] and [AssetsOnly] seem to have no effect on the elements of the lists.
Example Code
[Required]// This attribute does not work as expectedpublicList<Object>requiredList;[AssetsOnly]// This attribute does not work as expectedpublicList<Object>assetsOnlyList;
Expected Behavior
I expect the [Required] attribute to ensure that each element within the list is not null. Similarly, the [AssetsOnly] attribute should validate that each list element refers to an asset only.
Actual Behavior
The attributes seem to only apply to the list field itself and do not enforce the expected constraints on the individual elements within the list.
Request
I request a feature enhancement that allows these attributes to be applied effectively to each element within a list, ensuring that each element adheres to the specified constraints.
Note
Odin Inspector seems to use a [DontApplyToListElements] attribute to indicate that an attribute should be applied to the list itself, not to each element within the list.
The text was updated successfully, but these errors were encountered:
I've encountered an issue where attributes applied to list fields do not work as expected for each element within the lists. Specifically, attributes like
[Required]
and[AssetsOnly]
seem to have no effect on the elements of the lists.Example Code
Expected Behavior
I expect the
[Required]
attribute to ensure that each element within the list is not null. Similarly, the[AssetsOnly]
attribute should validate that each list element refers to an asset only.Actual Behavior
The attributes seem to only apply to the list field itself and do not enforce the expected constraints on the individual elements within the list.
Request
I request a feature enhancement that allows these attributes to be applied effectively to each element within a list, ensuring that each element adheres to the specified constraints.
Note
Odin Inspector seems to use a [DontApplyToListElements] attribute to indicate that an attribute should be applied to the list itself, not to each element within the list.
The text was updated successfully, but these errors were encountered: