unity 模型销毁_unity3D技术之Object.Destroy 销毁

static function Destroy (obj : Object, t : float = 0.0F) : void Description描述

Removes a gameobject, component or asset.

删除一个游戏物体,组件或者资源。

The object obj will be destroyed now or if a time is specified t seconds from now. If obj is a Component it will remove the component from the GameObject and destroy it. If obj is a GameObject it will destroy the GameObject, all its components and all transform children of the GameObject. Actual object destruction is always delayed until after the current Update loop, but will always be done before rendering.

物体obj现在被销毁或在指定了t时间过后销毁。【狗刨学习网】

如果obj是组件,它将从GameObject销毁组件component。如果obj是GameObject 它将销毁GameObject全部它的组件和GameObject全部transform子物体。实际物体的销毁总是延迟到当前更新循环后,但总是渲染之前完成。

?C#

?JavaScript

// Kills the game object

//销毁游戏物体

Destroy (gameObject);

// Removes this script instance from the game object

//从游戏物体删除该脚本实例

Destroy (this);

// Removes the rigidbody from the game object

//从游戏物体删除刚体

Destroy (rigidbody);

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值