Legacy Documentation: Version 4.5.0

Script language:

  • JS
  • C#
  • Boo
Script language

Select your preferred scripting language. All code snippets will be displayed in this language.

MonoScript.FromMonoBehaviour

static function FromMonoBehaviour(behaviour: MonoBehaviour): MonoScript;
static MonoScript FromMonoBehaviour(MonoBehaviour behaviour);
static def FromMonoBehaviour(behaviour as MonoBehaviour) as MonoScript

Parameters

behaviourThe MonoBehaviour whose MonoScript should be returned.

Description

Returns the MonoScript object containing specified MonoBehaviour.