Version: 5.4

Descripción

OnMouseUp se llama cuando el usuario ha soltado el botón del mouse.

Note that OnMouseUp is called even if the mouse is not over the same GUIElement or Collider as the has mouse has been pressed down on. For button-like behavior see: OnMouseUpAsButton.

using UnityEngine;
using System.Collections;

public class ExampleClass : MonoBehaviour { void OnMouseUp() { Debug.Log("Drag ended!"); } }

Esta función no es llamada en objetos que pertenezcan a la layer (capa) Ignore Raycast.

Esta función se llama en los Colliders marcados como Trigger si y solo sí Physics.queriesHitTriggers es true.

OnMouseUp can be a co-routine, simply use the yield statement in the function. This event is sent to all scripts attached to the Collider or GUIElement.