Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


MonoImporter

Represents a C# script in the project.
Read time 5 minutesLast updated 2 days ago

Definition

public class MonoImporter : AssetImporter

Methods

Method

Description

GetDefaultReferenceGets the default value for a reference field in the imported MonoScript.
GetIconGets the icon to associate with the imported MonoScript.
GetScriptGets the imported MonoScript. If the imported C# file contains multiple classes, the first is returned.
SetDefaultReferencesSets default references for this MonoScript.
SetIconSets a custom icon to associate with the imported MonoScript.

Static Methods

Method

Description

GetAllRuntimeMonoScriptsGets an array of scripts that will be available at runtime.
GetExecutionOrderGets the execution order for a MonoScript.
SetExecutionOrderSets the execution order for a MonoScript. This method forces Unity to reimport the MonoImporter for the target script.

Inheritance

Inherited Members

Operators

Operator

Description

operator ==Compares two object references to see if they refer to the same object.
boolDetermines whether the object exists.
operator !=Compares if two objects refer to a different object.