Skip to content

ButtonCollectionCellModel has empty text when less than 3 buttons are addedΒ #30

@rafaelcordoba-bandai

Description

@rafaelcordoba-bandai

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions