unity 改变纹理像素点的颜色
来源:互联网 发布:如何让mac不休眠 编辑:程序博客网 时间:2024/05/22 03:02
using UnityEngine;using System.Collections;public class SendLine : MonoBehaviour { public Vector3 targetPoint; private Transform MyTransform; public Texture2D TextureMap;void Start () { MyTransform = GetComponent<Transform>();}void Update () { sendLineMeth();} void sendLineMeth() { RaycastHit hit; if( Physics.Raycast(MyTransform.position, -MyTransform.up,out hit,10f)) { targetPoint= hit.point; Debug.DrawLine(MyTransform.position, targetPoint); //涂色 Vector2 pixelUV = hit.textureCoord; pixelUV.x *= TextureMap.width; pixelUV.y *= TextureMap.height; TextureMap.SetPixel((int)pixelUV.x, (int)pixelUV.y,Color.red); Debug.Log(pixelUV); TextureMap.Apply(); } }}
0 0
- unity 改变纹理像素点的颜色
- Opencv:Mat图像的复制,以及改变像素点的颜色
- unity 改变物体的颜色
- OpenCV改变像素颜色
- UIPageControl 改变点的颜色
- UIPageControl 改变点的颜色
- 提取某种颜色的像素点
- UIPageControl 的圆点颜色的改变
- 改变PageControl指示点的颜色
- 【Unity&NGUI】Label的颜色动态改变以及渐变颜色
- opengl 获取像素点颜色
- [概念]纹理的像素格式
- OpenCV响应鼠标事件&改变像素颜色
- unity shader 根据世界坐标,改变物体显示的颜色
- Unity中Button的颜色如何用脚本改变
- 位图像素的颜色
- Android中如何改变二维码的探测点的颜色
- Graphics2D、获取当前像素点颜色
- 71. Simplify Path
- include/linux/if_ppp.h:135: error: expected specifier-qualifier-list before 'aligned_u64'
- JavaIO流
- Girl stuck in drain
- Java并发编程:线程池的使用
- unity 改变纹理像素点的颜色
- Git创建分支
- 依赖注入的概念理解
- Mysql 数据库自动备份Shell脚本
- Android错误(子线程调用Toast报Can't create handler inside ~~~ 错误)
- struct大小计算
- spring 事务管理是在哪一层织入的
- VS各个版本之间2005、08、10、12...转换
- IEEE浮点标准详解