资源简介
UGUI各种UI shader效果,附带unity工程文件,大概几十种效果
代码片段和文件信息
using System;
using System.Linq;
using UnityEditor;
using UnityEngine;
using UnityEngine.UI;
namespace Coffee.UIExtensions
{
using BlurMode = UIEffect.BlurMode;
using ColorMode = UIEffect.ColorMode;
using ToneMode = UIEffect.ToneMode;
public static class ExportPackage
{
const string kPackageName = “UIEffect.unitypackage“;
static readonly string[] kAssetPathes =
{
“Assets/UIEffect“
};
[MenuItem(“Export Package/“ + kPackageName)]
[InitializeonloadMethod]
static void Export()
{
if (EditorApplication.isPlayingOrWillChangePlaymode)
return;
// Export package
AssetDatabase.ExportPackage(kAssetPathes kPackageName ExportPackageOptions.Recurse | ExportPackageOptions.Default);
UnityEngine.Debug.Log(“Export successfully : “ + kPackageName);
// Update readme.
System.IO.File.Copy(“Assets/UIEffect/README.md“ “README.md“ true);
}
[MenuItem(“Export Package/Generate Material Variants“)]
static void GenerateMaterialVariants()
{
#if UIEFFECT_SEPARATE
// On “UIEFFECT_SEPARATE“ mode generate effect materials on demand.
return;
#endif
// Export materials.
AssetDatabase.StartAssetEditing();
{
// For UIEffect
GenerateMaterialVariants(Shader.Find(UIEffect.shaderName));
// For UIEffectCapturedImage
GenerateMaterialVariants(Shader.Find(UIEffectCapturedImage.shaderName));
}
AssetDatabase.StopAssetEditing();
AssetDatabase.SaveAssets();
AssetDatabase.Refresh();
}
///
/// Generates the material variants.
///
static void GenerateMaterialVariants(Shader shader)
{
var combinations = (from tone in (ToneMode[])Enum.GetValues(typeof(ToneMode))
from color in (ColorMode[])Enum.GetValues(typeof(ColorMode))
from blur in (BlurMode[])Enum.GetValues(typeof(BlurMode))
select new { tone color blur }).ToArray();
for (int i = 0; i < combinations.Length; i++)
{
var comb = combinations[i];
EditorUtility.DisplayProgressBar(“Genarate Effect Material“ UIEffect.GetVariantName(shader comb.tone comb.color comb.blur) (float)i / combinations.Length);
UIEffect.GetOrGenerateMaterialVariant(shader comb.tone comb.color comb.blur);
}
EditorUtility.ClearProgressBar();
}
}
}
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2018-01-26 09:06 UIEffect-master\
文件 354 2018-01-26 09:06 UIEffect-master\.gitignore
目录 0 2018-01-26 09:06 UIEffect-master\Assets\
文件 191 2018-01-26 09:06 UIEffect-master\Assets\Editor.me
目录 0 2018-01-26 09:06 UIEffect-master\Assets\Editor\
文件 2259 2018-01-26 09:06 UIEffect-master\Assets\Editor\ExportPackage.cs
文件 262 2018-01-26 09:06 UIEffect-master\Assets\Editor\ExportPackage.cs.me
文件 191 2018-01-26 09:06 UIEffect-master\Assets\UIEffect.me
目录 0 2018-01-26 09:06 UIEffect-master\Assets\UIEffect\
文件 191 2018-01-26 09:06 UIEffect-master\Assets\UIEffect\Demo.me
目录 0 2018-01-26 09:06 UIEffect-master\Assets\UIEffect\Demo\
文件 4971 2018-01-26 09:06 UIEffect-master\Assets\UIEffect\Demo\Alpha.controller
文件 179 2018-01-26 09:06 UIEffect-master\Assets\UIEffect\Demo\Alpha.controller.me
文件 4951 2018-01-26 09:06 UIEffect-master\Assets\UIEffect\Demo\Blur.controller
文件 179 2018-01-26 09:06 UIEffect-master\Assets\UIEffect\Demo\Blur.controller.me
文件 13241 2018-01-26 09:06 UIEffect-master\Assets\UIEffect\Demo\Color.controller
文件 179 2018-01-26 09:06 UIEffect-master\Assets\UIEffect\Demo\Color.controller.me
文件 988195 2018-01-26 09:06 UIEffect-master\Assets\UIEffect\Demo\Demo - UIEffect.unity
文件 174 2018-01-26 09:06 UIEffect-master\Assets\UIEffect\Demo\Demo - UIEffect.unity.me
文件 18613 2018-01-26 09:06 UIEffect-master\Assets\UIEffect\Demo\Dialog.controller
文件 180 2018-01-26 09:06 UIEffect-master\Assets\UIEffect\Demo\Dialog.controller.me
文件 176679 2018-01-26 09:06 UIEffect-master\Assets\UIEffect\Demo\Pattern.png
文件 1203 2018-01-26 09:06 UIEffect-master\Assets\UIEffect\Demo\Pattern.png.me
文件 7585 2018-01-26 09:06 UIEffect-master\Assets\UIEffect\Demo\Shadow.controller
文件 179 2018-01-26 09:06 UIEffect-master\Assets\UIEffect\Demo\Shadow.controller.me
文件 4968 2018-01-26 09:06 UIEffect-master\Assets\UIEffect\Demo\ToneLevel.controller
文件 179 2018-01-26 09:06 UIEffect-master\Assets\UIEffect\Demo\ToneLevel.controller.me
文件 21888 2018-01-26 09:06 UIEffect-master\Assets\UIEffect\Demo\Transition.controller
文件 180 2018-01-26 09:06 UIEffect-master\Assets\UIEffect\Demo\Transition.controller.me
文件 468 2018-01-26 09:06 UIEffect-master\Assets\UIEffect\Demo\UIEffectDialogDemo.cs
文件 263 2018-01-26 09:06 UIEffect-master\Assets\UIEffect\Demo\UIEffectDialogDemo.cs.me
............此处省略53个文件信息
相关资源
- Unity屏幕特效之Bloom
- unity玻璃双面透明显示材质shader
- UGUI ScrollView 优化重复利用
- unity3d通透材质shader
- UGUI 动态加载内容的 dropdown 控件
- Unity DialogUI制作模板
- Unity3D内置Shader源码与详解解释文档
- The Complete Effect and HLSL Guide (中文版)
- The Complete Effect and HLSL Guide
- ShaderX7 CD-ROM
- 基于Shader开发的Unity碎屏特效
- OpenGL shader 代码,可正常编译,完美
- AndrewBox_LineRender&TrailRender
- Unity UGUI中复用率最高的滚动列表,不
- psd2uGUI的AssetStore版本
- unity特效,角色流光shader
- builtin_shaders-2017.4.8f1.zip
- 华南理工大学实验——OpenGL Shader导入
- UGUI画图脚本RadarChart.unitypackage
- Unity在Gamma空间模式Linear渲染的Shader
- UGUI ScrollRect 带按钮翻页支持拖拽
- BoatAttack_Unity201901修复版百度链接.tx
- u3d基于高度渐变色材质
- Unity3d Shader代码提示加高亮 一键安装
- UGUI轮播功能基于DoTween
- 翻页效果 书翻页
- LegacyImageEffects资源包.zip
- 实现各种颜色高亮闪烁的Shader
- EasyAR 显示阴影Shader
- ShaderlabVSCode 1.2.1.unitypackage
评论
共有 条评论