当前位置:网站首页>Unity加载GIf动画
Unity加载GIf动画
2022-07-31 05:18:00 【叶大锅】
Unity加载GIf动画
**问题点:**Unity目前对图形图像的支持还不是很完善,支持的图形文件格式有 PSD, TIFF, JPG, TGA, PNG, GIF, BMP, IFF, PICT等,但却不支持Gif动画。Unity原生是不支持Gif动画播放的

我总结了很多网上的资料,然后自己手把手做了一遍,加载gif格式的动画是很简单,可以看一下工程。
**解决方案:**由于unity没有gif格式的文件,所以我们无法在面板指定,需要动态加载,然后使用c#将gif里多帧图转化为Texture2D格式。
1.加载System.Drawing.dll文件至根目录Assets。这一步是调用处理图像,读取图片的每一帧并缓存为列表
2.遍历列表在Update当中刷出来
3.获取到图片路径,图片放在StreamingAssets目录下

4.将代码挂载到相机上,并启动该场景,可以看到动图效果。

边栏推荐
- 力扣刷题.快乐数
- DSPE-PEG-Biotin,CAS:385437-57-0,磷脂-聚乙二醇-生物素可延长循环半衰期
- Remote file xxx is mapped to the local path xxx and can't be found. You can continue debugging....
- C语言结构体(必须掌握版)
- Detailed explanation of mysql transaction principle
- ROS之service传输图片
- The content of the wangeditor editor is transferred to the background server for storage
- Solution for MySQL The table is full
- MySQL 入门:Case 语句很好用
- Pytorch学习笔记7——处理多维特征的输入
猜你喜欢

链表理论基础

pyspark.ml特征变换模块

Cholesterol-PEG-Acid CLS-PEG-COOH Cholesterol-Polyethylene Glycol-Carboxyl Modified Peptides

力扣刷题之排序链表

Cholesterol-PEG-DBCO Cholesterol-Polyethylene Glycol-Diphenylcyclooctyne Chemical Reagent

DSPE-PEG-COOH CAS: 1403744-37-5 Phospholipid-polyethylene glycol-carboxy lipid PEG conjugate

【Rhapsody学习笔记】1:Hello World
![[Solved] ssh connection report: Bad owner or permissions on C:\\Users/XXX/.ssh/config](/img/53/8b5a12e7ed551dca52ada5dbb5d6b5.png)
[Solved] ssh connection report: Bad owner or permissions on C:\\Users/XXX/.ssh/config

Tensorflow边用边踩坑

CAS:1403744-37-5 DSPE-PEG-FA 科研实验用磷脂-聚乙二醇-叶酸
随机推荐
Chemical Reagent Phospholipid-Polyethylene Glycol-Amino, DSPE-PEG-amine, CAS: 474922-26-4
Tensorflow相关list
Introduction to CLS-PEG-FITC Fluorescein-PEG-CLS Cholesterol-PEG-Fluorescein
拒绝采样小记
MySQL free installation download and configuration tutorial
DSPE-PEG-COOH CAS:1403744-37-5 磷脂-聚乙二醇-羧基脂质PEG共轭物
Cholesterol-PEG-Thiol CLS-PEG-SH Cholesterol-Polyethylene Glycol-Sulfhydryl
Cholesterol-PEG-NHS NHS-PEG-CLS 胆固醇-聚乙二醇-活性酯可修饰小分子材料
IDEA overview and installation and debugging
化学试剂磷脂-聚乙二醇-氨基,DSPE-PEG-amine,CAS:474922-26-4
十分钟教你玩转分支语句!!!!!小白速进,新手福利!!
2021年软件测试面试题大全
ROS subscription to multiple topics time synchronization problem
Picture-in-Picture API in the browser
科学研究用磷脂-聚乙二醇-活性酯 DSPE-PEG-NHS CAS:1445723-73-8
学习JDBC之获取数据库连接的方式
Research reagents Cholesterol-PEG-Maleimide, CLS-PEG-MAL, Cholesterol-PEG-Maleimide
opencv之图像二值化处理
力扣.找到打字符串中所有字母异位词
【Rhapsody学习笔记】4:Relations