Settings
Main Settings
2D/3D Paint has main settings. The configuration file is located at: Assets/XDPaint/Resources/XDPaintSettings.asset
. The settings file is ScriptableObject. Consider the fields in the settings file:
Default Brush
- default brush texture;Default Circle Brush
- default brush texture for BrushSampler/Clone tools;Default Pattern Texture
- default pattern texture for Brush/Bucket tools;VR Mode Enabled
- whether to use VR input;Pressure Enabled
- pressure force is applied to the brush size;Check Canvas Raycasts
- prevent painting on components if any other canvas component lies above the paint object. This also requires setting InputController settings: Canvas and Ignore For Raycasts (optional) fields;Raycasts Method
- method used to calculate raycasts. Job System method can increase painting performance for mesh components (MeshRenderer and SkinnedMeshRenderer) and requires Burst package that can be installed using Package Manager (Windows -> Package Manager).Brush Duplicate Part Width
- defines the frequency at which brush samples are rendered in case of usingSpriteRenderer
andRawImage
components. This value affects both the number of vertices and the density of the lines. A higher value results in fewer brush samples being drawn, which can reduce the detail and density of the line. Conversely, a lower value will produce more vertices, leading to dense lines;Raycast Interval
- defines the frequency at which raycasts will be performed. A higher value results in fewer brush samples being drawn, which can reduce the detail and density of the line. Conversely, a lower value will produce more vertices, leading to dense lines;Pixel Per Unit
- pixelPerUnit field for sprites. Used for objects that do not have the source sprite;Container Game Object Name
- the name of the GameObject, for the container object with InputController and RaycastController components.
States Settings
2D/3D Paint has undo/redo system and its setting which is called «States Settings». The configuration file is located at: Assets/XDPaint/Resources/XDPaintStatesSettings.asset. The settings file is ScriptableObject. Consider the fields in the settings file:
Undo Redo Enabled
- undo and redo functionality is enabled. If the application doesn't have undo/redo functionality, it is recommended to turn this flag off to reduce memory usage;Enable Undo Redo For Properties And Actions
- save undo/redo actions to change layer parameters such as opacity, blending mode, name, layer index, etc. If this flag is disabled, only layers RenderTextures will be saved on actions performed;Undo Redo Max Actions Count
- the maximum amount of actions that store undo/redo.