GFAssetCatalogMount¶
API Reference / Standard / 类索引
- 路径:
addons/gf/standard/utilities/assets/gf_asset_catalog_mount.gd - 模块:
Standard - 继承:
RefCounted - API:
public - 类别:运行时句柄 (
runtime_handle) - 首次版本:
unreleased
资产目录运行时挂载的生命周期句柄。 句柄保存提交时的目录快照、owner、mount ID、来源和 revision, 并提供幂等显式卸载入口。失败请求也返回带稳定状态与报告的非活动句柄。
成员概览¶
| 类型 | 名称 | 签名 |
|---|---|---|
| 常量 | STATUS_ACTIVE |
const STATUS_ACTIVE: StringName = &"active" |
| 常量 | STATUS_UNMOUNTED |
const STATUS_UNMOUNTED: StringName = &"unmounted" |
| 常量 | STATUS_CONFLICT |
const STATUS_CONFLICT: StringName = &"conflict" |
| 常量 | STATUS_BUILD_FAILED |
const STATUS_BUILD_FAILED: StringName = &"build_failed" |
| 常量 | STATUS_DUPLICATE_MOUNT |
const STATUS_DUPLICATE_MOUNT: StringName = &"duplicate_mount" |
| 常量 | STATUS_INVALID_REQUEST |
const STATUS_INVALID_REQUEST: StringName = &"invalid_request" |
| 常量 | STATUS_DISPOSED |
const STATUS_DISPOSED: StringName = &"disposed" |
| 方法 | is_active |
func is_active() -> bool: |
| 方法 | get_status |
func get_status() -> StringName: |
| 方法 | get_owner_id |
func get_owner_id() -> StringName: |
| 方法 | get_mount_id |
func get_mount_id() -> StringName: |
| 方法 | get_source_id |
func get_source_id() -> StringName: |
| 方法 | get_priority |
func get_priority() -> int: |
| 方法 | get_revision |
func get_revision() -> int: |
| 方法 | get_catalog |
func get_catalog() -> GFAssetCatalog: |
| 方法 | get_report |
func get_report() -> Dictionary: |
| 方法 | unmount |
func unmount() -> bool: |
| 方法 | to_dict |
func to_dict() -> Dictionary: |
常量¶
STATUS_ACTIVE¶
- API:
public - 首次版本:
unreleased
Mount 已提交且仍活动。
STATUS_UNMOUNTED¶
- API:
public - 首次版本:
unreleased
Mount 已由调用方或 owner scope 释放。
STATUS_CONFLICT¶
- API:
public - 首次版本:
unreleased
Mount 与已提交资产 ID 冲突。
STATUS_BUILD_FAILED¶
- API:
public - 首次版本:
unreleased
Provider 未能构建目录。
STATUS_DUPLICATE_MOUNT¶
- API:
public - 首次版本:
unreleased
同一 owner 已存在相同 mount ID。
STATUS_INVALID_REQUEST¶
- API:
public - 首次版本:
unreleased
Mount 请求缺少 owner、mount ID 或有效目录。
STATUS_DISPOSED¶
- API:
public - 首次版本:
unreleased
所属 Runtime 已释放。
方法¶
is_active¶
- API:
public - 首次版本:
unreleased
检查 Mount 是否仍在 Runtime 中活动。
返回:活动返回 true。
get_status¶
- API:
public - 首次版本:
unreleased
获取稳定终态状态。
返回:STATUS_* 常量之一。
get_owner_id¶
- API:
public - 首次版本:
unreleased
获取 owner ID。
返回:Mount owner ID。
get_mount_id¶
- API:
public - 首次版本:
unreleased
获取 owner scope 内稳定 mount ID。
返回:Mount ID。
get_source_id¶
- API:
public - 首次版本:
unreleased
获取来源 ID。
返回:Provider 来源 ID;直接目录 Mount 默认等于 mount ID。
get_priority¶
- API:
public - 首次版本:
unreleased
获取 Mount 优先级。
返回:合并优先级。
get_revision¶
- API:
public - 首次版本:
unreleased
获取最近一次提交该 Mount 的 Runtime revision。
返回:非负 revision。
get_catalog¶
- API:
public - 首次版本:
unreleased
获取 Mount 自身的资产目录快照。
返回:深拷贝目录。
get_report¶
- API:
public - 首次版本:
unreleased
获取 Mount 请求或提交报告。
返回:GFValidationReport 兼容字典副本。
结构:
return: GFValidationReport-compatible Dictionary with status, owner_id, mount_id, source_id, priority, and revision.
unmount¶
- API:
public - 首次版本:
unreleased
从所属 Runtime 卸载当前 Mount。
返回:本次调用完成卸载返回 true;已终态返回 false。
to_dict¶
- API:
public - 首次版本:
unreleased
转换为 JSON-safe 诊断摘要。
返回:Mount 摘要。
结构:
return: Dictionary with active, status, owner_id, mount_id, source_id, priority, revision, token, asset_ids, and report.