You are viewing a potentially older version of this package.
View all versions.
TexturePainterAPI
Color the texture in real time
| Date uploaded | 7 months ago |
| Version | 1.0.3 |
| Download link | GTFOModding-TexturePainterAPI-1.0.3.zip |
| Downloads | 1840 |
| Dependency string | GTFOModding-TexturePainterAPI-1.0.3 |
This mod requires the following mods to function
BepInEx-BepInExPack_GTFO
BepInEx pack for GTFO. Preconfigured and includes Unity Base DLLs.
Preferred version: 3.2.2README
API
var texture = new PaintableChannelMaskedTexture(Texture2D mainTexture); //This texture should contains full color info
texture.SetMainTexture(Texture2D newMainTexture);
//Color Mask Texture should be grayscale texture!
texture.SetMaskTexture(Texture2D mask); //Mask Texture could contain mask texture as separate RGB channel
texture.SetTintColor(Color maskTint1, Color maskTint2, Color maskTint3); //maskTint1 = Tint for R Channel, maskTint2 = Tint for G Channel, maskTint3 = Tint for B Channel
targetMat.mainTexture = texture.CurrentTexture; //This returns RenderTexture
texture.CreateCopy();