Skip to main content

manage_texture

Auto-generated from the Python tool registry. Do not hand-edit outside <!-- examples:start --><!-- examples:end --> blocks — the generator (tools/generate_docs_reference.py) will overwrite them.

Group: vfx  ·  Module: services.tools.manage_texture

Description

Procedural texture generation for Unity. Creates textures with solid fills, patterns (checkerboard, stripes, dots, grid, brick), gradients, and noise. Actions: create, modify, delete, create_sprite, apply_pattern, apply_gradient, apply_noise, set_import_settings

Parameters

NameTypeRequiredDescription
actionLiteral['create', 'modify', 'delete', 'create_sprite', 'apply_pattern', 'apply_gradient', 'apply_noise', 'set_import_settings']yesAction to perform.
pathstr | NoneOutput texture path (e.g., 'Assets/Textures/MyTexture.png')
widthint | NoneTexture width in pixels (default: 64)
heightint | NoneTexture height in pixels (default: 64)
fill_colorlist[int | float] | dict[str, int | float] | str | NoneFill color as [r, g, b] or [r, g, b, a] array, {r, g, b, a} object, or hex string. Accepts both 0-255 range (e.g., [255, 0, 0]) or 0.0-1.0 normalized range (e.g., [1.0, 0, 0])
patternLiteral['checkerboard', 'stripes', 'stripes_h', 'stripes_v', 'stripes_diag', 'dots', 'grid', 'brick'] | NonePattern type for apply_pattern action
palettelist[list[int | float]] | str | NoneColor palette as [[r,g,b,a], ...]. Accepts both 0-255 range or 0.0-1.0 normalized range
pattern_sizeint | NonePattern cell size in pixels (default: 8)
pixelslist[list[int]] | str | NonePixel data as JSON array of [r,g,b,a] values or base64 string
image_pathstr | NoneSource image file path for create/create_sprite (PNG/JPG).
gradient_typeLiteral['linear', 'radial'] | NoneGradient type (default: linear)
gradient_anglefloat | NoneGradient angle in degrees for linear gradient (default: 0)
noise_scalefloat | NoneNoise scale/frequency (default: 0.1)
octavesint | NoneNumber of noise octaves for detail (default: 1)
set_pixelsdict[Any] | NoneRegion to modify: {x, y, width, height, color or pixels}
as_spritedict | bool | NoneConfigure as sprite: {pivot: [x,y], pixels_per_unit: 100} or true for defaults
import_settingsdict[Any] | NoneTextureImporter settings dict. Keys: texture_type (default/normal_map/sprite/etc), texture_shape (2d/cube), srgb (bool), alpha_source (none/from_input/from_gray_scale), alpha_is_transparency (bool), readable (bool), generate_mipmaps (bool), wrap_mode/wrap_mode_u/wrap_mode_v (repeat/clamp/mirror/mirror_once), filter_mode (point/bilinear/trilinear), aniso_level (0-16), max_texture_size (32-16384), compression (none/low_quality/normal_quality/high_quality), compression_quality (0-100), sprite_mode (single/multiple/polygon), sprite_pixels_per_unit, sprite_pivot, sprite_mesh_type (full_rect/tight), sprite_extrude (0-32)

Returns

A dict containing the Unity response. The exact shape depends on the action.

Examples

No examples yet. Add usage examples here — they will be preserved across regenerations.