UnityDebugSheet icon indicating copy to clipboard operation
UnityDebugSheet copied to clipboard

ButtonCollectionCellModel has empty text when less than 3 buttons are added

Open rafaelcordoba-bandai opened this issue 1 year ago • 0 comments

https://github.com/Haruma-K/UnityDebugSheet/blob/master/Assets/Demo/02_DefaultCells/Scripts/DefaultCellsDemoDebugPage.cs#L209C44-L209C69

var buttonCollectionData = new ButtonCollectionCellModel();
            for (var i = 0; i < 2; i++)
            {
                var index = i;
                var collectionButtonData = new CollectionButtonModel();
                collectionButtonData.Text = $"Collection Button {index}";
                collectionButtonData.Clicked += () => Debug.Log($"Collection Button Clicked {index}");
                buttonCollectionData.Buttons.Add(collectionButtonData);
            }

            AddButtonCollection(buttonCollectionData);

in the example code above, if you only add 2 buttons, the text becomes "" if you add 3 buttons or more, then the text is displayed properly

rafaelcordoba-bandai avatar Nov 27 '24 11:11 rafaelcordoba-bandai