直接将代码放在RawImage上(不能放在Image上面) 附加代码的物体RawImage上面的Texture需要设定为空,然后附加Mask组件,子物体同时需要RawImage组件并设定为需要上色展示的图像,可以忽略透明区域检测上色百分比 需要注意revocations变量不能等于1或者0,否则会进入死循环 用起来如果有卡顿,就改变RawImage的Scale值,Scale越大绘画越流畅 文中用到的GameManager在这篇文章:Unity学习笔记:在GameManager里记录手游操作框架_努力长头发的程序猿的博客-CSDN博客 using System; using System.Collections.Generic; using UnityEngine; using UnityEngine.EventSystems; using UnityEngine.UI; public class Painting : MonoBehaviour,IPointerEnterHandler,IPointerExitHandler { public Color color;...
Is this you? As a journalist, you can create a free Muck Rack account to customize your profile, list your contact preferences, and upload a portfolio of your best work.
Claim your profile