2D-игра на Unity. Отсечение окклюзии для текстур ⇐ C#
2D-игра на Unity. Отсечение окклюзии для текстур
I want to make a non-tiled (without use of tilemaps) open world. I have figured out that scene based system is not really good at open worlds building, so i came up with creating single scene with many square planes. My scripts are automatically creating pieces of textures and materials for each plane. So, if the world is that big i want it to be, i get a ram problem: all this textures are about 1gb.
It would be nice to do like an occlusion culling for them, so textures near the camera are loaded in ram, anything else is not. I already tried to make it, but my perfomance is really bad.
This is my script located on Camera object:
void Update() { if (playerRB.velocity == Vector2.zero) return; var coords = Vector2Int.RoundToInt(transform.position / 10); for (var x = -1; x
Источник: https://stackoverflow.com/questions/780 ... r-textures
I want to make a non-tiled (without use of tilemaps) open world. I have figured out that scene based system is not really good at open worlds building, so i came up with creating single scene with many square planes. My scripts are automatically creating pieces of textures and materials for each plane. So, if the world is that big i want it to be, i get a ram problem: all this textures are about 1gb.
It would be nice to do like an occlusion culling for them, so textures near the camera are loaded in ram, anything else is not. I already tried to make it, but my perfomance is really bad.
This is my script located on Camera object:
void Update() { if (playerRB.velocity == Vector2.zero) return; var coords = Vector2Int.RoundToInt(transform.position / 10); for (var x = -1; x
Источник: https://stackoverflow.com/questions/780 ... r-textures
-
- Похожие темы
- Ответы
- Просмотры
- Последнее сообщение