U3D学习使用笔记(三)

1.对动画进行播放和暂停(从初始位置)

(1).老版动画系统Animation

暂停

an["Take 001"].time = 0f;
an["Take 001"].speed = 0f;
an.Play("Take 001");
播放
an["Take 001"].speed = 1f;
an.Play("Take 001");
(2).新版动画系统Animator
暂停
Animator.Play("same state you are", -1, 0f);

Animator.speed = 0f;

播放
Animator.Play("same state you are", -1, 0f);

Animator.speed = 1f;

2.No Android Moudle Support
去官网下个600多KB安装装打开就选中Android support选项解决
3.public FaceFeature FaceFeatureData
        {
            get { return mFaceFeature; }
            set { mFaceFeature = value; }
        }
类型调用结构体中函数ToStruct后mFaceFeature值并没发生改变
4.使用5以前版本打assetbundle方式在有材质和纹理时没有打进一个assetbundle中会导致材质和纹理丢失模型变紫,处理方案是打prefab时连材质和纹理也选中打assetbundle
5.使用代码动态对MeshRenderer中Materials设置值Try creating a Material[] array yourself, setting all of its properties (like you did) and then run

meshRenderer.materials = myMaterialArray;

6.有些组件前面有勾选的框有的没有如果脚本里有Start或者Update这个函数就是可以勾选,如果没有就不可以

7.EasyAR动态生成流程

(1)把EasyAR和ImageTarget预设都使用实例化函数(ImageTarget在EasyAR前实例化)

(2)在ImageTargetBehaviour的Awake函数中设置下面相关数据

(3)使用下ImageTarget里面的Mesh组件才能识别

8.有AR摄像机和主摄像机时为了达到一个粒子特效效果让主摄像机渲染特效,AR摄像机不渲染粒子特效(比如模型扫描出现时刻)

9.全局宏

posted on   unreall  阅读(267)  评论(0编辑  收藏  举报

编辑推荐:
· Linux系列:如何用 C#调用 C方法造成内存泄露
· AI与.NET技术实操系列(二):开始使用ML.NET
· 记一次.NET内存居高不下排查解决与启示
· 探究高空视频全景AR技术的实现原理
· 理解Rust引用及其生命周期标识(上)
阅读排行:
· 单线程的Redis速度为什么快?
· 展开说说关于C#中ORM框架的用法!
· Pantheons:用 TypeScript 打造主流大模型对话的一站式集成库
· SQL Server 2025 AI相关能力初探
· 为什么 退出登录 或 修改密码 无法使 token 失效

导航

< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

统计

点击右上角即可分享
微信分享提示