docs.run2go.idoptidrawData Management (Scriptable Object)
Back to optidraw
OptiDraw Core System

Data Management (Scriptable Object)

How OptiDraw stores painting data in modular, reusable ScriptableObjects for seamless project integration.

OptiDraw Data Assets

All painting state in OptiDraw is stored in dedicated ScriptableObject assets — OptiDrawData files. These assets live in your project folder alongside your meshes and textures, are tracked by version control, and can be shared across multiple GameObjects that share the same mesh.

Creating a Data Asset

  1. 1Select a GameObject that has a MeshRenderer or SkinnedMeshRenderer
  2. 2Open the OptiDraw Inspector panel (Window → OptiDraw → Painter)
  3. 3Click Create New Data Asset — OptiDraw generates an OptiDrawData ScriptableObject in the same folder as your mesh
  4. 4The asset is automatically assigned to the selected GameObject

What Data Assets Store

  • Vertex color buffer per submesh (RGBA float32)
  • Splat weight maps (up to 4 layers, packed as UV2/UV3 channels)
  • Layer stack: blend modes, opacity values, mask references per layer
  • Texture paint bakes: references to generated RenderTexture assets
  • Per-submesh UDIM tile offsets for multi-texture set workflows

One OptiDrawData asset can be reused across multiple prefab instances of the same mesh. Changes made in the editor propagate to all instances automatically.

Saving & Reloading

OptiDraw auto-saves to the ScriptableObject on every brush stroke (batched per frame to avoid excessive IO). Reopening the scene or reloading Unity restores painting state exactly as it was — no baking required to preserve work in progress.

Do not delete the OptiDrawData asset while the mesh is in the scene. The Inspector will warn you, but orphaned GameObjects will lose their paint data permanently.