Skip to content

Component (JavaScript) ​

Component ​

Scripting Name:Insight.Component

组件基类。

Properties ​


enabled ​

type : boolean

该组件是否是可用的。

gameObject ​

type : Insight.GameObject

(只读)该组件所依附的 GameObject。

isActiveAndEnabled ​

type : boolean

(只读)该组件是否可用,且其依附的 GameObject 是否是活跃状态。

name ​

type : string

(只读)所依附的 GameObject 的名称。

tag ​

type : string

(只读)所依附的 GameObject 的 Tag。

⚠️ 暂时未启用

transform ​

type : Insight.Transform

(只读)所依附的 GameObject 的 transform。

Methods ​


tostring ​

public string toString();

将 comp 内容以一定格式转为 string 类型。