TableList + Button = Unity freez.
Issue #357
new
- If you have a [Tablelist], which features TWO [Button] in an Odin window like this one, and if those buttons are not in an a [ButtonGroup] The performance of the game/editor/unity drop drastically. Almost freeze the whole thing.
- If you put those two buttons in the same [ButtonGroup] It's fine.
Here's a screenshot and the code of the said "fine" tablelist:
public class GameStatePage : DebugPage
{
[ShowIf("Active"), TableList]
public List<GameStatePageButton> GameStates;
}
[Serializable]
public class GameStatePageButton
{
public readonly GameStatePage Page;
public readonly State State;
[ShowInInspector]
public string Id
{
get { return State.Id; }
}
[Button, ButtonGroup("Actions")]
public void Push()
{
}
[Button, ButtonGroup("Actions")]
public void SwitchTo()
{
}
}
No exceptions... Sorry I wish I could tell you more, but here's a screenshot of what actually happens as soon as I remove the two [ButtonGroup]
And oh boy is my editor laggy
https://media.discordapp.net/attachments/440896556971982878/463998890002087936/unknown.png
Screenshot of the profile (if it helps)
https://media.discordapp.net/attachments/440896556971982878/464000103175290881/unknown.png
But again, if I put them in the same [ButtonGroup] it's back to the good ol' speedy Odin. You know... I had to guess, it might has something to with TableList taking the labels and putting them on top. But I don't know.... Hopefully it helps. Even if it's just a little bit.
For the record, this was stated as happening in Unity 2018.1.0f2, and I presume on Windows.