SaintsField icon indicating copy to clipboard operation
SaintsField copied to clipboard

[GetComponentInChildren] on a list shows list count to 1 instead of 2 (regression?)

Open laurentopia opened this issue 1 year ago • 2 comments
trafficstars

repro: add a dummy script to both children, let's call it... Dummy.cs add a parent script FindDummy.cs [GetComponentInChildren] public List<Dummy> dummies; it will only finds the first dummy, this used to work image then when i open the list in the inspector it finds both image

laurentopia avatar Aug 04 '24 04:08 laurentopia

This function is, well, poorly implemented yet.

The reason of this is, array/list relies on SaintsEditor to fill some value, and only the array/list expanded, the drawer can be drawn, which is the actual filling code can work. Well, at least in IMGUI (UI Toolkit expand it by default) it is this case.

This feature will be implemented later I guess. I'm taking a short vacation aparting from my work & stuff, so will be after that.

TylerTemp avatar Aug 09 '24 08:08 TylerTemp

awesome! I'll just keep an eye out for funky populating until then

laurentopia avatar Aug 10 '24 01:08 laurentopia

Hi,

this is now possible in 3.4.0 without expanding the array. I did not test on some very old Unity, but instead, I disabled the UI Toolkit to see the IMGUI result, so it's not guaranteed.

If you still have this issue, please comment with your Unity version (please give the full number, e.g. 2019.4.01f)

TylerTemp avatar Oct 14 '24 14:10 TylerTemp

Roger that! I'll close for now.

laurentopia avatar Oct 30 '24 20:10 laurentopia