MonoScript

class in UnityEditor

/

Inherits from:TextAsset

Switch to Manual

Description

脚本资源的表示。

该类表示存储在项目中的 C#、JavaScript 和 Boo 文件。

Public Functions

GetClass返回该脚本实现的类的 System.Type 对象。

Static Functions

FromMonoBehaviour返回包含特定 MonoBehaviour 的 MonoScript 对象。
FromScriptableObject返回包含特定 ScriptableObject 的 MonoScript 对象。

Inherited members

Variables

hideFlagsShould the object be hidden, saved with the Scene or modifiable by the user?
name对象的名称。
bytes文本资源的原始字节。(只读)
text字符串形式的 .txt 文件的文本内容。(只读)

Public Functions

GetInstanceID返回对象的实例 ID。
ToString返回 GameObject 的名称。
ToString返回 TextAsset 的内容。

Static Functions

Destroy删除 GameObject、组件或资源。
DestroyImmediate立即销毁对象 /obj/。强烈建议您改用 Destroy。
DontDestroyOnLoadDo not destroy the target Object when loading a new Scene.
FindObjectOfType返回第一个类型为 type 的已加载的激活对象。
FindObjectsOfType返回所有类型为 type 的已加载的激活对象的列表。
Instantiate克隆 original 对象并返回克隆对象。

Operators

bool该对象是否存在?
operator !=比较两个对象是否引用不同的对象。
operator ==比较两个对象引用,判断它们是否引用同一个对象。