๊ฒ์์ค๋ธ์ ํธ๋ฅผ ๋ฐ๋ผ๋ค๋๋ UI๊ฐ ํ๋ ์๋๋ฐ ์จ๋ค๋จธ์ ์นด๋ฉ๋ผ๋ก ์ด๋๋ ๋ ์ด UI๊ฐ ๊ฒ์์ค๋ธ์ ํธ๋ฅผ ๋ฐ๋ผ๊ฐ๊ธด ํ๋๋ฐ ๋งค ํ๋ ์ ์์น๊ฐ ํ์ด ๋ณด์ด๋๋ฐ ์นด๋ฉ๋ผ ์ด๋์ด ์์ผ๋ฉด ์ ์์ ์ผ๋ก ๋ฐ๋ผ๋ค๋.
๋ฐ๋ผ๊ฐ๋ ์คํฌ๋ฆฝํธ๊ฐย late update ์์๋ ํ๋๊ฒ ๋ ์ฌํ๊ณ ๊ทธ๋๋ง fixed update ์ ๋ฃ์ผ๋ฉด ๋ํ๊ธด ํ๋ฐ ๊ฒ์ ํ๋ ์ ๋ฎ์ผ๋ฉด ๊ฒฐ๊ตญ ํ๋๊ฒ ๋ฐ์ํจ
ํ๊ฒ ๊ฒ์์ค๋ธ์ ํธ ์ด๋์ fixedupdate์์ ์ฒ๋ฆฌํ๊ณ ์์?
์ด๋์ rigidbody๋ก ํ๊ณ ์์
private void OnEnable() { RenderPipelineManager.beginCameraRendering += UpdateParallax; } private void OnDisable() { RenderPipelineManager.beginCameraRendering -= UpdateParallax; }
private void UpdateParallax(ScriptableRenderContext scriptableRenderContext, UnityEngine.Camera cam)
์ ์๋์ ์ซ์๋ค๋๋ ์ฝ๋ ์ถ๊ฐํด๋ด
ํ ์คํธ ํด๋ดค๋๋ฐ UpdateParallax ํธ์ถ์ด ์๋จ.
renderPipeline ์ด URP ์์๋ง ํธ์ถ ๋๋๊ฒ ๊ฐ์์ Camera.onPreRender ๋ก ๋์ฒํ๋๊น ํด๊ฒฐ ๋์ ใณใณ