void OnResize() { _backend?.Dispose(); if (_tiles.IsCreated) { _tiles.Dispose(); } _backend = new SimpleMeshBackend(_size, _size, Allocator.Persistent); //_backend = new MeshDataJobBackend(_size, _size, Allocator.Persistent); _tiles = new TileData(_size, _size, Allocator.Persistent); }
public SimpleTerminal(int w, int h, float tileWidth, float tileHeight, Allocator allocator) { Mesh = new Mesh(); _size = new int2(w, h); _tiles = new TileData(w, h, allocator); _allocator = allocator; _tileSize = new float2(tileWidth, tileHeight); _backend = new SimpleMeshBackend(w, h, allocator).WithTileSize(_tileSize); _isDirty = true; _isDirty = true; ClearScreen(); ImmediateUpdate(); }