跳转到内容

setTextureBudget

此内容尚不支持你的语言。

setTextureBudget(bytes): void

Defined in: resourceManager.ts:70

Set the resident GPU-texture byte budget. When resident bytes exceed this, the C++ ResourcePool evicts least-recently-used unreferenced textures. 0 disables caching — a texture frees the moment its refcount hits zero. Negative / fractional inputs are clamped to a non-negative integer.

The engine applies RuntimeConfig.textureCacheBudget at startup, so scene switches keep recently-used textures warm by default; call this (or set textureCacheBudget in the build config) to size it for your game.

This is the single game-facing surface over the C++ budget; there is no parallel TS-side budget to drift from it.

number

void