随笔分类 - Unity
Unity
摘要:推荐: https://www.cnblogs.com/nanwei/p/7277417.html 上面链接作者的整个系列都写的不错 https://www.cnblogs.com/nanwei/category/1025420.html 【Unity Shader】 数据类型和关键字 一、基本数据
阅读全文
摘要:效果: c# shader 使用image effect模板 噪点图 注意:需要将噪点图的warp mode设置为repeat ,否则就是一闪而过的波动
阅读全文
摘要:需要在粒子上挂脚本 脚本添加代码 这是个生命周期 粒子的 StopAction 设置成Callback 最好再加上
阅读全文
摘要:碰撞发生在帧的开始,所以你可以检测到冲突,并在LateUpdate复位:
阅读全文
摘要:using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.EventSystems; public class ClickTest : MonoBehaviour { // Use this for initialization void S...
阅读全文
摘要:https://www.cnblogs.com/mrma/p/3998679.html 试了,确实可行,在unity也能用 值得注意的是UnityScript.Scripting.Evaluator 也有这个类,应该可以实现类似的功能,具体用法未研究
阅读全文
摘要:unity 项目合集:https://michidk.github.io/Unity-Script-Collection/ ugui特效:https://github.com/mob-sakai/UIEffect?tdsourcetag=s_pctim_aiomsg ecs破碎特效:https://
阅读全文
摘要:using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; public class Jietu : MonoBehaviour { //ui //ui挂在一个unlitTexture材质球上 public Image img;...
阅读全文
摘要:一种是alpha检测 一种是设置collider 参考: https://zhuanlan.zhihu.com/p/34204396 下面给出第二种方案代码
阅读全文
摘要:https://blog.csdn.net/e295166319/article/details/52370575 需要两个类:树节点类和界面实现类 1:树节点类(TreeNode) 2:界面实现类(CreateTreeList) 效果图: (点击后,被点击的节点红色显示,并在控制台输出被点击的节点
阅读全文
摘要:【DOTween】 SetEase 过渡类型 SetAutoKill 播放完不自动消除 DoMove 第三个参数 snapping 设置为 true ,Ease。Linear的设置才有效 Tweener t = GetComponent<RectTransform>().DOLocalMove(ne
阅读全文
摘要:using UnityEngine; public enum AnchorPresets { TopLeft, TopCenter, TopRight, MiddleLeft, MiddleCenter, MiddleRight, BottomLeft, BottonCenter, ...
阅读全文
摘要:unity asset store 关联下载 ,添加这个书签 javascript:var url = window.location.href;var id = url.substr(url.lastIndexOf("-") + 1);var submitto = "http://www.cgso
阅读全文
摘要:效果: 点击按钮后: 这些碎片具有物理碰撞效果,下面会有隐形的支柱垫着碎片,n秒后支柱消失,碎片落下 当然你也可以控制生成的碎片,让他们从下而上一块一块地落下 插件源码: https://github.com/mjholtzem/Unity-2D-Destruction 基本使用说明 导入Unity
阅读全文
摘要:不需要编写额外的shader和任何代码,只使用自带的功能 新建一个材质球,取名为mask,选择自带的UI/Default,调节参数如下图 再新建一个材质球,取名为masked,调节参数如下图 如下图所示, 背景图为Panel 遮罩图为Image_m 注意层级关系! 即可实现 来源:https://a
阅读全文
摘要:using System.Collections; using System.Collections.Generic; using UnityEngine; using System; using System.Linq; public static class RandomHelper { //
阅读全文