Wanzyee Studio
ScriptExtension

Extension methods for UnityEditor.MonoScript. More...

Static Public Member Functions

static Type GuessClass (this MonoScript script)
 Try to get the type declared in the script. More...
 

Detailed Description

Extension methods for UnityEditor.MonoScript.

Member Function Documentation

static Type GuessClass ( this MonoScript  script)
static

Try to get the type declared in the script.

Built-in MonoScript.GetClass() doesn't support the generic type definition and interface. In that case, this tries to find out with a simple parsing method. Please use with caution since it may be not so precise.

Parameters
scriptThe script.
Returns
The type.