智能客服
你问我答,随时在线为你解决问题
Class/Struct Info |
|---|
public readonly struct QueryPattern<T1>where T1 : struct 表示查询组件签名的结构体,用于表示查询的组件结构。 T为IComponent,最多支持10个组件类型。 |
Name | Type | Description |
|---|---|---|
Components | IComponents | 查询的组件类型。 |
ComponentCount | int | 查询的组件类型数量。 |
// 创建QueryPattern var pattern = QueryPattern.Get<PgdPosition>(); pattern.ComponentCount; // 1 pattern.Components; // 等于IComponents.Get<PgdPosition>()
Qualifier and Type | Method Name and Description |
|---|---|
string | ToString() 返回查询签名字符串。 |
Method |
|---|
string ToString() 返回查询签名字符串,打印的组件和标签名字均会带命名域。 |
Return
Type | Description |
|---|---|
string | 查询签名。 |
Sample Code
// 创建QueryPattern var pattern = QueryPattern.Get<PgdPosition>(); // 打印查询签名信息。预设组件/标签命名域为"Pgd.",自定义组件/标签/共享组件根据实际情况而定 pattern.ToString(); // "QueryPattern: [Pgd.PgdPosition]"