资源简介
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
相关资源
- Shader Forge 1.3.8.0_unity2018.unitypackage
- Unity3D从入门到精通.pdf
- unity游戏开发UI专用音效资源
- Unity结合Kinect2体感开发:KinectForWind
- unity强化画面效果专用插件-Beautify
- 太空大战Unity3D教程第一课成品
- unity3d 双面贴图
- unity3d官方赛车游戏教程中文版
- VText 1.37.unitypackage
- Fast Shadow Receiver1.4.2 for unity3d 5
- unity3d虚拟摇杆贴图集合
- Unity3d UGUI 官方
- unity3d烟花特效部分带音效.zip
- Unity3d5.x《我的世界》游戏工程源码
- DoozyUI和DoTween双插件
- unity2D RPG游戏模板
- sheely.unitypackage
- Odin - Inspector and Serializer 2.1.4.unitypac
- unity3d战争迷雾插件
- Unity3D 对普通手柄的支持
- unity 3d实战核心技术详解电子书
- Unity3D特效 光圈特效 Effect 6 Type 资源包
- 2D Toolkit v2.5.8.6.unitypackage
- unity3d QuickRopes3.16 绳子创建插件
- UGUI Super ScrollView2.2.4
- Unity3D角色FBX模型带动作动画
- Unity3D创建简单漫游教程
- Unity3D汽车模型集合 Cars and Trucks Coll
- Unity3D开发的简单赛车游戏
- Unity3D上传图片以及解析二进制流
评论
共有 条评论