unity, particle play once and destroy
粒子播放一次后销毁:
//ref: http://answers.unity3d.com/questions/219609/auto-destroying-particle-system.html
//ref: http://answers.unity3d.com/questions/41855/cannot-implicitly-convert-type-unityengineobject-t.html
particle.GetComponent<ParticleSystem> ().Stop ();
particle.GetComponent<ParticleSystem> ().Play ();
float particleDurTime = particle.GetComponent<ParticleSystem> ().duration + particle.GetComponent<ParticleSystem> ().startLifetime;
Destroy (particle, particleDurTime);
unity, particle play once and destroy的更多相关文章
- Unity Particle System Sorting Order
http://answers.unity3d.com/questions/577288/particle-system-rendering-behind-sprites.html
- unity, particle system Emit from Edge
- BEST FREE UNITY ASSETS – OVER 200 CURATED QUALITY ASSETS
http://www.procedural-worlds.com/blog/best-free-unity-assets-categorised-mega-list/ BEST FREE UNITY ...
- unity, destroy gameObject & destroy all children
一,destroy gameObject 删除名为xxx的gameObject 错误方法1: Destroy(xxx); 以上方法之所以错误,是因为Destroy在下一帧才生效,而在本帧之内xxx还存 ...
- UNITY Destroy()和DestroyImadiate()都不会立即释放对象内存
如题,destroyimadiate是立即将物体从场景hierachy中移除,并标记为 "null",注意 是带引号的null.这是UNITY内部的一个处理技巧.关于这个技巧有很争 ...
- UNITY Destroy()和DestroyImadiate()的区别
using System.Collections; using System.Collections.Generic; using System.Timers; using UnityEngine; ...
- unity, Destroy注意事项
Destroy不是立即发生作用,而是推迟到帧末,所以下面代码是错误的: void OnTriggerEnter(Collider other){ if (other.gameObject.tag ...
- Unity 游戏对象消失 enable,destroy与active的区别
gameObject.SetActive(false):是否在场景中停用该物体,停用后Hierarchy窗口呈灰色,用Find函数也找不到.如果该物体有子物体,要用SetActive Recursir ...
- Unity Destroy和DestroyImmediate
Destroy(Object obj, float t = 0.0F); 删除一个游戏对象,组件或者资源. 物体obj现在被销毁或在指定了t时间过后销毁.如果obj是组件,它将从GameObject销 ...
随机推荐
- Unity中Invoke 和 InvokeRepeating的区别
Invoke() 方法是 Unity3D 的一种委托机制 如: Invoke("Test", 5); 它的意思是:5 秒之后调用 Test() 方法: 使用 Invoke() ...
- linux svn 配置
#svnadmin create projectname #vi projectname/conf/svnserve.conf anon-access = noneauth-access =write ...
- for of 与 for in的区别2
遍历数组通常使用for循环,ES5的话也可以使用forEach,ES5具有遍历数组功能的还有map.filter.some.every.reduce.reduceRight等,只不过他们的返回结果不一 ...
- Objective-C:KVC机制
KVC:key value coding 键值对的编码 功能:用来给对象属性设置值或者取出对象属性的值.虽然getter和setter方法也是该功能,但是如果类中没有设置属性特性或者重写这两个方 ...
- Qt 5.7 亮瞎眼的更新
Qt 5.7的beta版已经出来了,这将是一个超级重大的更新,主要有几个商业版的模块在GPLv3 open source 版的用户也可以用了,其中包括了两个很炫酷的模块: Qt Charts Qt D ...
- 二八定律全面分析SEO全过程
首先,大体的了解SEO的整个流程,SEO的整个流程无非是:关键词选定.标题标签描述的正确描写---内部优化----外链----内容---友情链接---更新. 在SEO界流行这样一句话:“内容为王,外链 ...
- http://blog.csdn.net/xingfuzhijianxia/article/details/6433918
http://blog.csdn.net/xingfuzhijianxia/article/details/6433918
- :视频播放器与Handler 完美调用
Handler之消息循环 Handler是用于操作线程内部的消息队列的类.这有点绕,没关系,我们慢慢的来讲.前面Looper一篇讲到了Looper是用于给线程创建消息队列用的,也就是说Looper ...
- 【资料总结】html开发小实例
目 录 第1章 1 HTML的基本标签 1 第2章 25 表格基础 25 第3章 53 表单和框架 53 第4章 77 CSS样式表 77 第5章 104 使用Dreamweaver制作网页 104 ...
- java程序main方法的参数String[] args
public class ArgsTest { public static void main(String[] args) { System.out.println(args.length); fo ...