Skip to main content

Posts

Magic Paint

Set textures(brushes and the texture for painting). Drag the “Magic Paint” prefab into scene. Drag the texture for painting to the “Paint Texture” variable in inspector 。 And than,click the “Create Magic Paint” button. 3.Fuctions. void Pause() void Resume() Pause and resume void Clear(Color32 color) void Clear( ) Clear the texture for painting by color void Color32 GetColor() void SetColor(Color32 color) void SetColor(Color32 mainColor, Color32[] subColors) Get and set color Texture2D GetPaintTexture() void SetPaintTexture(Texture2D tex) Get and set the texture for Painting byte[] PreReadTex(Texture2D tex) Preload the brush texture if the texture ‘s size is too large. void SetParticle(GameObject particlePrefab = null) void SetAudio(AudioClip audioClip = null) Set the particle and the audio void UsePencil(int brushSize = 5) void UsePencil(Color32 color, int brushSize) Use pencil void Us
Recent posts

Magic Paint

Magic Paint