2D-игра на Unity. Отсечение окклюзии для текстурC#

Место общения программистов C#
Ответить Пред. темаСлед. тема
Anonymous
 2D-игра на Unity. Отсечение окклюзии для текстур

Сообщение Anonymous »


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
Реклама
Ответить Пред. темаСлед. тема

Быстрый ответ

Изменение регистра текста: 
Смайлики
:) :( :oops: :roll: :wink: :muza: :clever: :sorry: :angel: :read: *x)
Ещё смайлики…
   
К этому ответу прикреплено по крайней мере одно вложение.

Если вы не хотите добавлять вложения, оставьте поля пустыми.

Максимально разрешённый размер вложения: 15 МБ.

  • Похожие темы
    Ответы
    Просмотры
    Последнее сообщение

Вернуться в «C#»