OnMouseUpAsButtonはマウスを押した時と同じGUIElementやCollider上でマウスを離した時のみに呼び出されます。
See Also: OnMouseUp.
	// Loads the level named "SomeLevel" as a response
	// to the user clicking on the object
	function OnMouseUpAsButton () {
		Application.LoadLevel ("SomeLevel");
	}
      using UnityEngine; using System.Collections; public class ExampleClass : MonoBehaviour { void OnMouseUpAsButton() { Application.LoadLevel("SomeLevel"); } }
import UnityEngine import System.Collections public class ExampleClass(MonoBehaviour): def OnMouseUpAsButton() as void: Application.LoadLevel('SomeLevel')
この関数はレイヤーが「Ignore Raycast」のゲームオブジェクトでは呼び出されません。 OnMouseUpAsButtonは関数の中にシンプルなyield文を使用して、コルーチンにすることができます。 このイベントはColliderまたはGUIElementにアタッチされているすべてのスクリプトに送信されます。