editor.texture

Texture asset introspection and modification

← API Reference

editor.texture.getInfo

Returns core information about a Texture2D asset: dimensions, format, mip count, compression, sRGB, memory size.

Name Type Required Description
pathstringYesAsset path of the texture

Returns

Field Type Description
namestringTexture name
asset_pathstringFull asset path
size_xnumberTexture width in pixels
size_ynumberTexture height in pixels
num_mipsnumberNumber of mip levels
pixel_formatstringPixel format (e.g. "PF_DXT5", "PF_BC7")
compressionstringCompression setting name
lod_groupstringLOD group name
srgbboolWhether sRGB is enabled
virtual_texture_streamingboolWhether virtual texture streaming is enabled
memory_size_bytesnumberEstimated GPU memory size in bytes
max_texture_sizenumberMax texture size override (0 = no override)

Example Request

{
  "jsonrpc": "2.0", "id": 1, "method": "editor.texture.getInfo",
  "params": { "path": "/Game/Textures/T_Hero_D.T_Hero_D" }
}

Example Response

{
  "jsonrpc": "2.0", "id": 1,
  "result": {
    "name": "T_Hero_D",
    "asset_path": "/Game/Textures/T_Hero_D.T_Hero_D",
    "size_x": 2048,
    "size_y": 2048,
    "num_mips": 12,
    "pixel_format": "PF_DXT5",
    "compression": "Default",
    "lod_group": "World",
    "srgb": true,
    "virtual_texture_streaming": false,
    "memory_size_bytes": 5592405,
    "max_texture_size": 0
  }
}

editor.texture.getSettings

Returns all editable texture settings: compression, LOD group, filter, address mode, sRGB, streaming.

Name Type Required Description
pathstringYesAsset path of the texture

Returns

Field Type Description
namestringTexture name
asset_pathstringFull asset path
compressionstringCompression setting name
lod_groupstringLOD group name
filterstringTexture filter (Default, Nearest, Bilinear, Trilinear)
address_xstringX address mode (Wrap, Clamp, Mirror)
address_ystringY address mode (Wrap, Clamp, Mirror)
srgbboolWhether sRGB is enabled
virtual_texture_streamingboolWhether VT streaming is enabled
lod_biasnumberLOD bias value
max_texture_sizenumberMax texture size override
never_streamboolWhether streaming is disabled

Example Request

{
  "jsonrpc": "2.0", "id": 1, "method": "editor.texture.getSettings",
  "params": { "path": "/Game/Textures/T_Hero_D.T_Hero_D" }
}

editor.texture.setCompression

Changes the compression setting of a texture. Triggers texture rebuild.

Name Type Required Description
pathstringYesAsset path of the texture
compressionstringYesNew compression setting (case-insensitive)

Valid compression values: Default, Normalmap, Masks, Grayscale, Displacementmap, VectorDisplacementmap, HDR, EditorIcon, Alpha, DistanceFieldFont, HDR_Compressed, BC7, HalfFloat, LQ, SingleFloat, HDR_F32

Returns

Field Type Description
successboolWhether the change succeeded
pathstringAsset path
old_compressionstringPrevious compression setting
new_compressionstringNew compression setting

Example Request

{
  "jsonrpc": "2.0", "id": 1, "method": "editor.texture.setCompression",
  "params": { "path": "/Game/Textures/T_Hero_N.T_Hero_N", "compression": "Normalmap" }
}

editor.texture.setLODGroup

Changes the LOD group (texture group) of a texture. Affects streaming and mip generation.

Name Type Required Description
pathstringYesAsset path of the texture
lod_groupstringYesNew LOD group name (case-insensitive)

Common LOD group values: World, WorldNormalMap, WorldSpecular, Character, CharacterNormalMap, CharacterSpecular, Weapon, Vehicle, Cinematic, Effects, EffectsNotFiltered, Skybox, UI, Lightmap, RenderTarget, Shadowmap, Pixels2D, HierarchicalLOD

Returns

Field Type Description
successboolWhether the change succeeded
pathstringAsset path
old_lod_groupstringPrevious LOD group
new_lod_groupstringNew LOD group

Example Request

{
  "jsonrpc": "2.0", "id": 1, "method": "editor.texture.setLODGroup",
  "params": { "path": "/Game/Textures/T_Hero_D.T_Hero_D", "lod_group": "Character" }
}

editor.texture.setSRGB

Sets or clears the sRGB flag on a texture. Affects how the texture is sampled in shaders.

Name Type Required Description
pathstringYesAsset path of the texture
srgbboolYesWhether to enable sRGB (true) or disable it (false)

Returns

Field Type Description
successboolWhether the change succeeded
pathstringAsset path
old_srgbboolPrevious sRGB state
new_srgbboolNew sRGB state

Example Request

{
  "jsonrpc": "2.0", "id": 1, "method": "editor.texture.setSRGB",
  "params": { "path": "/Game/Textures/T_Hero_N.T_Hero_N", "srgb": false }
}

Example Response

{
  "jsonrpc": "2.0", "id": 1,
  "result": {
    "success": true,
    "path": "/Game/Textures/T_Hero_N.T_Hero_N",
    "old_srgb": true,
    "new_srgb": false
  }
}

editor.texture.setMaxSize

Sets the maximum texture resolution override. The engine will downscale the texture to this size at cook time. Set to 0 to remove the override.

Name Type Required Description
pathstringYesAsset path of the texture
max_sizenumberYesMax texture size (0 = no limit, or power of 2: 32-8192)

Valid max_size values: 0 (no limit), 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192

Returns

Field Type Description
successboolWhether the change succeeded
pathstringAsset path
old_max_sizenumberPrevious max size (0 = no limit)
new_max_sizenumberNew max size

Example Request

{
  "jsonrpc": "2.0", "id": 1, "method": "editor.texture.setMaxSize",
  "params": { "path": "/Game/Textures/T_Hero_D.T_Hero_D", "max_size": 1024 }
}

Example Response

{
  "jsonrpc": "2.0", "id": 1,
  "result": {
    "success": true,
    "path": "/Game/Textures/T_Hero_D.T_Hero_D",
    "old_max_size": 0,
    "new_max_size": 1024
  }
}