用于本机资产的可序列化URL。供内部使用。
内部使用。
该资源是否已经成功加载。
此资源包含的文本。
当场景或 Prefab 被标记为 asyncLoadAssets,禁止延迟加载该资源所依赖的其它 RawAsset。
禁止预加载原生对象。
此资源的基础资源(如果有)。 此属性可用于访问与资源相关的其他详细信息或功能。
如果_native可用,则此属性将由加载器初始化。
此资源的基础资源(如果有)。 此属性可用于访问与资源相关的其他详细信息或功能。
如果_native可用,则此属性将由加载器初始化。
表示该对象是否可用(被 destroy 后将不可用)。
当一个对象的 destroy 调用以后,会在这一帧结束后才真正销毁。
因此从下一帧开始 isValid 就会返回 false,而当前帧内 isValid 仍然会是 true。
如果希望判断当前帧是否调用过 destroy,请使用 isValid(obj, true),不过这往往是特殊的业务需求引起的,通常情况下不需要这样。
该对象的名称。
该对象的名称。
返回该资源对应的目标平台资源的 URL,如果没有将返回一个空字符串。
Clear all references in the instance.
NOTE: this method will not clear the getter or setter functions which defined in the instance of CCObject. You can override the _destruct method if you need, for example: _destruct: function () { for (var key in this) { if (this.hasOwnProperty(key)) { switch (typeof this[key]) { case 'string': this[key] = ''; break; case 'object': case 'function': this[key] = null; break; } } }
为此资源设置原始文件名。
使用该资源在场景中创建一个新节点。
如果这类资源没有相应的节点类型,该方法应该是空的。
销毁该对象,并释放所有它对其它对象的引用。
实际销毁操作会延迟到当前帧渲染前执行。从下一帧开始,该对象将不再可用。
您可以在访问对象之前使用 isValid(obj) 来检查对象是否已被销毁。
whether it is the first time the destroy being called
派发一个指定事件,并传递需要的参数
event type
检查指定事件是否已注册回调。
Event type.
Callback function when event triggered.
Callback callee.
注册事件目标的特定事件类型回调。这种类型的事件应该被 emit 触发。
A string representing the event type to listen for.
The callback that will be invoked when the event is dispatched. The callback is ignored if it is a duplicate (the callbacks are unique).
The target (this object) to invoke the callback, can be null
注册事件目标的特定事件类型回调,回调会在第一时间被触发后删除自身。
A string representing the event type to listen for.
The callback that will be invoked when the event is dispatched. The callback is ignored if it is a duplicate (the callbacks are unique).
移除在特定事件类型中注册的所有回调或在某个目标中注册的所有回调。
The event type or target with which the listeners will be removed
应 AssetDB 要求提供这个方法。 返回一个序列化后的对象
在当前 EventTarget 上删除指定目标(target 参数)注册的所有事件监听器。 这个函数无法删除当前 EventTarget 的所有事件监听器,也无法删除 target 参数所注册的所有事件监听器。 这个函数只能删除 target 参数在当前 EventTarget 上注册的所有事件监听器。
The target to be searched for all related listeners
应 AssetDB 要求提供这个方法。
内部使用。
Generated using TypeDoc
文本资源。