QueryPattern<T1, ...>

展开

Class/Struct Info

public readonly struct QueryPattern<T1>where T1 : struct

表示查询组件签名的结构体,用于表示查询的组件结构。

T为IComponent,最多支持10个组件类型。

Property Summary

展开

Name

Type

Description

Components

IComponents

查询的组件类型。

ComponentCount

int

查询的组件类型数量。

Sample Code
// 创建QueryPattern
var pattern = QueryPattern.Get<PgdPosition>();
pattern.ComponentCount; // 1
pattern.Components; // 等于IComponents.Get<PgdPosition>()

Method Summary

展开

Qualifier and Type

Method Name and Description

string

ToString()

返回查询签名字符串。

Methods

ToString

展开

Method

string ToString()

返回查询签名字符串,打印的组件和标签名字均会带命名域。

Return

展开

Type

Description

string

查询签名。

Sample Code

// 创建QueryPattern
var pattern = QueryPattern.Get<PgdPosition>();
// 打印查询签名信息。预设组件/标签命名域为"Pgd.",自定义组件/标签/共享组件根据实际情况而定
pattern.ToString(); // "QueryPattern: [Pgd.PgdPosition]"
搜索
请输入您想要搜索的关键词