Image Inpainting
Basic Usage
Texture2D edited = await sourceTexture
.GENInpaint("Add a red car in the center")
.ExecuteAsync();Input Types
Texture2D + Instruction
Texture2D texture = Resources.Load<Texture2D>("Scene");
Texture2D edited = await texture
.GENInpaint("Replace sky with sunset")
.ExecuteAsync();Sprite + Instruction
Sprite sprite = Resources.Load<Sprite>("Character");
Texture2D edited = await sprite
.GENInpaint("Add a sword in right hand")
.ExecuteAsync();ImagePrompt
File Input
Configuration
Model Selection
With Mask
Common Use Cases
1. Object Removal
2. Object Addition
3. Background Replacement
4. Style Transfer (Selective)
5. Repair/Fix
Unity Integration Examples
Example 1: Screenshot Editor
Example 2: Texture Touchup Tool
Example 3: Dynamic Scene Editing
Example 4: Character Customization
Example 5: Batch Processing
Instruction Tips
✅ Good Instructions
❌ Bad Instructions
Provider Support
OpenAI DALL-E 2
Limitations
Best Practices
✅ Do
❌ Don't
Error Handling
Next Steps
Last updated