位置: 编程技术 - 正文

【转】【UNITY3D 游戏开发之四】有关实现2D帧序列帧播放相关—Animating Tiledtexture(unity 3d教程)

编辑:rootadmin

推荐整理分享【转】【UNITY3D 游戏开发之四】有关实现2D帧序列帧播放相关—Animating Tiledtexture(unity 3d教程),希望有所帮助,仅作参考,欢迎阅读内容。

文章相关热门搜索词:unity 3d教程,unity-3d,unity3d官方教程,unity-3d,unity3d documentation,unity3ds,unity3d官方教程,unity3ds,内容如对您有帮助,希望把文章链接给更多的朋友!

本站文章均为 李华明Himi 原创,转载务必在明显处注明:(作者新浪微博: @李华明Himi ) 转载自【黑米GameDev街区】 原文链接:           ☞ 点击订阅 ☜ 本博客最新动态!及时将最新博文通知您!

                 

Himi 尝试使用了此作者《CSharp – SpritSheet.cs》代码段,发现其中有一个算法估计是作者大意写错了。这样改了就矩形也都支持了。

Author: Joachim Ante

Contents【转】【UNITY3D 游戏开发之四】有关实现2D帧序列帧播放相关—Animating Tiledtexture(unity 3d教程)

[hide]

1 Description2 Usage3 JavaScript – AnimatedTextureUV.js4 CSharp – SpritSheet.cs5 CSharp – SpritSheetNG.cs6 CSharp – AnimateTiledTextureDescription

This script animates a texture containing tiles of an animation. You can give it a framerate to determine the speed of the animation and set how many tiles on x, y there are.

Usage

Attach this script to the object that has a material with the tiled texture. To avoid distortion, the proportions of the object must be the same as the proportions of each tile (eg 1:2 for the sheet below).

Here is an example of how to lay out a texture for it (Thanks to BigBrainz for providing it):

(Leo Nogueira) Adding a simple image with multiple rows for testing purposes and a modified version of the C# Script:

JavaScript – AnimatedTextureUV.jsCSharp – SpritSheet.cs

This is just a CSharp version of the AnimatedTextureUV.js above.

CSharp – SpritSheetNG.cs

The CSharp version of the script was not working with multiple rows so i made some changes.

CSharp – AnimateTiledTexture

A version using coroutines. Slightly faster since it doesn’t update every frame and only sets the texture scale once.

Unity 3D 接入 移动MM (3.1.3)计费SDK 首先很想吐槽移动MM的SDK,简直就是给Unity开发人员找事做。我是一个Unity小白,完全是为了帮同事接这个SDK,所以一切按照小白的规则来写,希望没有遗

Unity3D中的Post effects 提要所谓posteffects,就是后处理,在渲染的流水线中属于最后的阶段,处理的对象是由场景生成的一张图片。常见的后处理效果有HDR,MotionBlur等,通过

Unity3D - 资源管理 转载自:

本文链接地址:https://www.jiuchutong.com/biancheng/378758.html 转载请保留说明!

上一篇:unity3d 项目编辑ios版本出错问题解决方法(unity编辑工具软件介绍)

下一篇:Unity 3D 接入 移动MM (3.1.3)计费SDK(unity连接)

免责声明:网站部分图片文字素材来源于网络,如有侵权,请及时告知,我们会第一时间删除,谢谢! 邮箱:opceo@qq.com

鄂ICP备2023003026号

网站地图: 企业信息 工商信息 财税知识 网络常识 编程技术

友情链接: 武汉网站建设 电脑维修 湖南楚通运网络