资源简介
UGUI各种UI shader效果,附带unity工程文件,大概几十种效果 5.6以上版本 需要text mesh pro 插件 unity商店有免费下载即可

代码片段和文件信息
#if TMP_PRESENT
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using TMPro.EditorUtilities;
using UnityEditor;
using Coffee.UIExtensions;
using System.IO;
using System.Linq;
using System;
namespace Coffee.UIEffect.Editors
{
public class TMP_SDFShaderGUI : TMPro.EditorUtilities.TMP_SDFShaderGUI
{
static GUIstyle s_Paneltitle;
Material currentMaterial;
public override void OnGUI(MaterialEditor materialEditor MaterialProperty[] properties)
{
currentMaterial = materialEditor.target as Material;
base.OnGUI(materialEditor properties);
}
protected override void DoGUI()
{
if (currentMaterial.HasProperty(“_FaceColor“))
{
base.DoGUI();
}
else
{
DrawSpritePanel();
}
var name = currentMaterial.shader.name;
if (name.EndsWith(“(UIEffect)“))
{
DrawEffectPanel();
}
else if (name.EndsWith(“(UIDissolve)“))
{
DrawDissolvePanel();
}
else if (name.EndsWith(“(UIShiny)“))
{
DrawShinyPanel();
}
else if (name.EndsWith(“(UITransition)“))
{
DrawTransitionPanel();
}
}
void DrawSpritePanel()
{
if (BeginTmpPanel(“Sprite“ true))
{
EditorGUI.indentLevel += 1;
DoTexture2D(“_MainTex“ “Texture“);
DoColor(“_Color“ “Color“);
EditorGUI.indentLevel -= 1;
}
EndTmpPanel();
}
void DrawDissolvePanel()
{
if (BeginTmpPanel(“Dissolve“ true))
{
EditorGUI.indentLevel += 1;
DoTexture2D(“_NoiseTex“ “Texture“);
DrawEnum(currentMaterial);
EditorGUI.indentLevel -= 1;
}
EndTmpPanel();
}
void DrawShinyPanel()
{
}
void DrawTransitionPanel()
{
if (BeginTmpPanel(“Transition“ true))
{
EditorGUI.indentLevel += 1;
DoTexture2D(“_NoiseTex“ “Texture“);
DrawEnum(currentMaterial);
EditorGUI.indentLevel -= 1;
}
EndTmpPanel();
}
void DrawEffectPanel()
{
if (BeginTmpPanel(“Effect“ true))
{
EditorGUI.indentLevel += 1;
DrawEnum(currentMaterial);
DrawEnum(currentMaterial);
DrawEnum(currentMaterial);
DrawToggleKeyword(currentMaterial “Advanced Blur“ “EX“);
EditorGUI.indentLevel -= 1;
}
EndTmpPanel();
}
static void DrawEnum(Material mat)
{
Type type = typeof(T);
string[] names = System.Enum.GetNames(type);
int[] values = System.Enum.GetValues(type) as int[];
int mode = 0;
for (int i = 0; i < names.Length; i++)
{
if (mat.IsKeywordEnabled(names[i].ToUpper()))
mode = values[i];
}
var newMode = EditorGUILayout.IntPopup(objectNames.NicifyVariableName(type.Name) mode names values);
if (mode != newMode)
{
Array.IndexOf(values mode);
mat.DisableKeyword(names[Array.IndexOf(values mode)].ToUpper());
if (newMode != 0)
mat.EnableKeyword(names[Array.IndexOf(values newMode)].ToUpper());
}
}
static void DrawToggleKeyword(Material mat string label string keyword)
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2019-06-30 14:12 UIEffect-develop\
目录 0 2019-06-30 14:12 UIEffect-develop\.github\
文件 591 2019-06-30 14:12 UIEffect-develop\.github\FUNDING.yml
目录 0 2019-06-30 14:12 UIEffect-develop\.github\ISSUE_TEMPLATE\
文件 565 2019-06-30 14:12 UIEffect-develop\.github\ISSUE_TEMPLATE\bug_report.md
文件 576 2019-06-30 14:12 UIEffect-develop\.github\ISSUE_TEMPLATE\feature_request.md
文件 454 2019-06-30 14:12 UIEffect-develop\.github\ISSUE_TEMPLATE\question.md
文件 155 2019-06-30 14:12 UIEffect-develop\.github_changelog_generator
文件 490 2019-06-30 14:12 UIEffect-develop\.gitignore
目录 0 2019-06-30 14:12 UIEffect-develop\Assets\
文件 191 2019-06-30 14:12 UIEffect-develop\Assets\Coffee.me
目录 0 2019-06-30 14:12 UIEffect-develop\Assets\Coffee\
文件 191 2019-06-30 14:12 UIEffect-develop\Assets\Coffee\UIExtensions.me
目录 0 2019-06-30 14:12 UIEffect-develop\Assets\Coffee\UIExtensions\
文件 191 2019-06-30 14:12 UIEffect-develop\Assets\Coffee\UIExtensions\UIEffect.me
目录 0 2019-06-30 14:12 UIEffect-develop\Assets\Coffee\UIExtensions\UIEffect\
文件 20927 2019-06-30 14:12 UIEffect-develop\Assets\Coffee\UIExtensions\UIEffect\CHANGELOG.md
文件 174 2019-06-30 14:12 UIEffect-develop\Assets\Coffee\UIExtensions\UIEffect\CHANGELOG.md.me
文件 172 2019-06-30 14:12 UIEffect-develop\Assets\Coffee\UIExtensions\UIEffect\ForTMPro.me
目录 0 2019-06-30 14:12 UIEffect-develop\Assets\Coffee\UIExtensions\UIEffect\ForTMPro\
文件 191 2019-06-30 14:12 UIEffect-develop\Assets\Coffee\UIExtensions\UIEffect\ForTMPro\Editor.me
目录 0 2019-06-30 14:12 UIEffect-develop\Assets\Coffee\UIExtensions\UIEffect\ForTMPro\Editor\
文件 3882 2019-06-30 14:12 UIEffect-develop\Assets\Coffee\UIExtensions\UIEffect\ForTMPro\Editor\TMP_SDFShaderGUI.cs
文件 243 2019-06-30 14:12 UIEffect-develop\Assets\Coffee\UIExtensions\UIEffect\ForTMPro\Editor\TMP_SDFShaderGUI.cs.me
文件 172 2019-06-30 14:12 UIEffect-develop\Assets\Coffee\UIExtensions\UIEffect\ForTMPro\Shaders.me
目录 0 2019-06-30 14:12 UIEffect-develop\Assets\Coffee\UIExtensions\UIEffect\ForTMPro\Shaders\
文件 4851 2019-06-30 14:12 UIEffect-develop\Assets\Coffee\UIExtensions\UIEffect\ForTMPro\Shaders\TMP_SDF (UIDissolve).shader
文件 433 2019-06-30 14:12 UIEffect-develop\Assets\Coffee\UIExtensions\UIEffect\ForTMPro\Shaders\TMP_SDF (UIDissolve).shader.me
文件 5608 2019-06-30 14:12 UIEffect-develop\Assets\Coffee\UIExtensions\UIEffect\ForTMPro\Shaders\TMP_SDF (UIEffect).shader
文件 433 2019-06-30 14:12 UIEffect-develop\Assets\Coffee\UIExtensions\UIEffect\ForTMPro\Shaders\TMP_SDF (UIEffect).shader.me
文件 4772 2019-06-30 14:12 UIEffect-develop\Assets\Coffee\UIExtensions\UIEffect\ForTMPro\Shaders\TMP_SDF (UIHsvModifier).shader
............此处省略320个文件信息
- 上一篇:中兴v881刷机工具包
- 下一篇:数据中心红宝书2019技术期刊合集.pdf
相关资源
- Unity3D登录界面工程
- unity3d反编译工具
-
UnityWebPla
yerFull - Unity纪念碑谷.rar
- Unity3d实现扭动挤压浏览效果
- unity案例入门坦克大战源码
- Unity3D游戏开发.pdf 宣雨松著完整高清
- Unity3D版水果忍者
- unity3d爆炸特效包
- unity3d_见缝插针源码及报告.zip
- Unity3d车库场景模型
- unity3d 警察动画模型
- unity3D 新手引导遮罩,支持圆形和矩形
- unity3d枪支武器包FPS第一人称射击游戏
- unity3d制作贪吃蛇
- unity3D暴力街区射击大战游戏源码
- Unity3D 实战视频教程 保卫萝卜 2D 游戏
- unity3d调用中央气象局城市天气数据,
- Unity 3D Paint in 3D (1.7.3)
- 2014年最新最好的Unity3d圣典之中文脚本
- Unity无限滚动列表(自动分页和网络请
- Unity3D搓牌效果支持4个方向
- Unity3D课程设计 模拟火焰效果
- 贝塞尔曲线的unity3d实现
- [资源插件]Unity3D_UGUI HUD Text v1.4.1.zip
- ShaderlabVSCode 1.1.6.unitypackage
- Camera Path Animator unity3d 插件
- Unity录屏模块封装清晰的可调AVPro Mo
- UGUI 上的TableView
- FBX格式人物模型,资源齐全,带动画
评论
共有 条评论