Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed a bug where entries in groups not under control get deleted. #54

Merged
merged 1 commit into from
Jan 25, 2024

Conversation

Haruma-K
Copy link
Member

Control下にないグループのエントリが削除されてしまうバグを修正しました。

Related Issue: #53

.AddressRules
.Where(x => x.Control.Value)
.Select(x => x.AddressableGroup.Name)
.ToArray();

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Editor機能なのであまり気にしなくてもいいかもしれませんがToHashSetにしておくと、Containsが高速になって良いかもしれません

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

それは思ったんですが、開発環境がUnity2020.3なのでギリギリ使えなそうです!

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

コンストラクタでやる手も一応あります

            var controlGroupNamesEnumerable = _layoutRule
                                    .AddressRules
                                    .Where(x => x.Control.Value)
                                    .Select(x => x.AddressableGroup.Name);
            var controlGroupNames = new HashSet<string>(controlGroupNamesEnumerable);

@Haruma-K Haruma-K requested a review from hkmt-mmy January 24, 2024 09:50
@Haruma-K Haruma-K merged commit e6a5c6c into main Jan 25, 2024
1 check passed
@Haruma-K Haruma-K deleted the feature/issue_53 branch January 25, 2024 06:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants