Version: 2017.3

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.

Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961