There are several places in our code that can be simplified by using EntityComponentManager::SetComponentData to create a component for the specified entity if the component doesn't already exist. I initially made these improvements in #2228 but am splitting them out here and back porting to harmonic. There should be no behavior changes from this PR, just more concise code.
Checklist
[X] Signed all commits for DCO
[ ] Added tests
[ ] Updated documentation (as needed)
[ ] Updated migration guide (as needed)
[ ] Consider updating Python bindings (if the library has them)
[ ] While waiting for a review on your PR, please help review another open pull request to support the maintainers
Note to maintainers: Remember to use Squash-Merge and edit the commit message to match the pull request summary while retaining Signed-off-by messages.
🦟 Bug fix
Split out from #2228
Summary
There are several places in our code that can be simplified by using
EntityComponentManager::SetComponentData
to create a component for the specified entity if the component doesn't already exist. I initially made these improvements in #2228 but am splitting them out here and back porting to harmonic. There should be no behavior changes from this PR, just more concise code.Checklist
codecheck
passed (See contributing)Note to maintainers: Remember to use Squash-Merge and edit the commit message to match the pull request summary while retaining
Signed-off-by
messages.