var fixedSimGroup = World.CreateSystemManaged<FixedStepSimulationSystemGroup>();
fixedSimGroup.Timestep = 0.1f;
fixedSimGroup.Update();
์ด๊ฑธ๋ก DOTS ๋ฌผ๋ฆฌ ๊ณ์ฐ ์ฃผ๊ธฐ ๋ฐ๊ฟจ๋๋ฐ
์กด๋ ์ด์ํ์ ๋ํ๋๊ณ ์ ๋๋ก ์ ์ฉ๋ ์๋จ
์ด๊ฑฐ ๋ด๊ฐ ์๋ชปํ๊ฑฐ๋ ์๋ ๋ฒ๊ทธ๋
dots physics๋ ์์จ๋ฐ์๋ชจ๋ฆ
physics ์๋์ฌ๋ fixedStepSimulationSystemGorup ์ฃผ๊ธฐ๋ฅผ mono fixedUpdate ์ฒ๋ผ ๊ณ ์ ์ฃผ๊ธฐ๋ก ๋ฐ๊ฟ ์ ์๋ ๋ฐฉ๋ฒ ์๋ ํด์ ํด๋ดค๋๋ฐ ์๋๋๋ผ..
๊ธฐ๋ฅ๋ง ๋ณด๋ฉด ๊ทธ๋ฅ entity ํจํค์ง ๊ธฐ๋ฅ์
๊ทผ๋ฐ ๊ทธ๋ฅ ECS์์ fixedUpdate๋ฅผ ์ธ์ผ์ด ๋ฌผ๋ฆฌ์๋๊ฒฝ์ฐ์๋ ์์? ์ด๋ค ์ด์ํ์์ด ์ผ์ด๋๋๊ฑฐ์
์๋ ๋ฌผ๋ฆฌ๋ฅผ ์์ด๋ค๋๊ฒ ์๋๊ณ
https://docs.unity3d.com/Packages/com.unity.entities@0.17/api/Unity.Entities.FixedStepSimulationSystemGroup.html
์์ฐ๋๊ฒ
์๋๋ผ๋๋ง์, DOTS Physics๋ฅผ ์ฐ์ง ์์ง๋ง ์ ๋ํฐ ๋ฌผ๋ฆฌ๋ฅผ ์ด๋ค๋๊ฑฐ์?
์์ ๋งํฌ์ค๋ช ๋ณด๋ฉด
The value of Time.ElapsedTime and Time.DeltaTime will be temporarily overriden while this group is updating. The systems in this group will update as many times as necessary at the fixed timestep in order to "catch up"
์๊ฐ ๋ง ์์์ ์ผ๋ก Time.DeltaTime๊ฐ์๊ฑฐ ๊ฑด๋๋ฆฐ๋ค๋ ์๊ธฐ๊ฐ ์๋ค. ์ด๋ฐ๊ฑฐ๋๋ฌธ์ ์ด์ํ์์ด ๋ฒ์ด์ง๋๊ฑด๊ฐ?
์ ๊ฑฐ ๋ฐ๊พธ๊ณ ์๊ฐ ์ฐ์ด๋ด๋ ์คํ ์ฃผ๊ธฐ ์๋ฐ๋๊ณ ์ด์ํ๊ฒ ์คํฐํฐ๋ง์๊น
FixedStepSimulationSystemGroup ์ System์ด ๋์ํ๋๋ก ๋ฃ์ด์คฌ์ด?
[UpdateInGroup(typeof(FixedStepSimulationSystemGroup))]
์๊ฑฐ ๋งํ๋๊ฑฐ์ง??
์ ๊ทธ๊ฑฐ ํ์ด?
ใ ใ ์คํ๋ ๊ฑฐ์ ํ์ด
๊ทธ๋ฅ ์ ๋ํฐ ํ๋ก์ ํธ ์ธํ ์ ์๋ ๊ฐ ์๋์ผ๋ก ์ ์ฉ๋๊ฒ์ข ๋ง๋ค์ด๋์งใ ใ
์ค๋ ฅ์ค์ ๋ physics step์ผ๋ก ๋ฐ๋ก ๋นผ๋๊ณ entity๋ ์ ๋ํฐ ์๋ํฐ๋ ๊ทธ๋ฅ ๋ค ๋ฐ๋ก๋ ธ๋๊ฑฐ๊ฐ์
์ผ๋จ ํ์ฌ Entities1.0์ Transform2 ๋ฒ์ ์ด๊ณ Physics1.0 ์ Transform1 ๋ฒ์ ์ด์ผ.
๊ทธ๊ฒ ๋๋ฌธ์ ในใ ํ์ง์ค 1.0 ๊น๊ณ ๊ฐ๊ณ ์ํจ
์ง๊ธ์ ๋ฌผ๋ฆฌ ๊ฑด๋ค์ง ์๋๊ฒ ์ข์.
๊ทผ๋ฐ ๋ถํ ์ฒ๋ฆฌ job์์ ๋ถํ ์ฒ๋ฆฌ ์ด๋ป๊ฒ ํ๋์ง ์์? ์ฒซ ํ๋ ์์ 50% ๋ค์ ํ๋ ์์ 50% ์ด๋ฐ์์ผ๋ก ๋ถํ ํด์ ์ก๋๋ฆฌ๊ณ ์ถ์๋ฐ entity aspect ๊ทธ๋ฅ ๋ฃ๊ณ job ๋๋ฆฌ๋ฉด 100% ๋ค์ฒ๋ฆฌ๋๋ฒ๋ฆฌ์๋ ์ด๊ฑฐ ๋๋ ์ ์ฒ๋ฆฌ ๋ชปํ๋;
TagComponentData ๋๋ IEnableComponent๋ฅผ ์ฌ์ฉํด์ ๋๊ตฌ๋ฅผ ํ์ฌํ๋ ์์์ ์ฒ๋ฆฌํ ์ง ์ง์ ํด์ค์ผํ ๋ฏ
ใ ใ ใณ ์ฐธ๊ณ ํ ๊ฒ
๋ฌผ๋ฆฌ๊ฑ ์ด์ํด์ ์ง์ ๊ตฌํํ๋ค๊ฐ ํผ๋ฅ์ธ๊ณ ๋ DOTS ์ ์