Version: 5.3 (switch to 5.4b)
言語English
  • C#
  • JS

スクリプト言語

好きな言語を選択してください。選択した言語でスクリプトコードが表示されます。

MonoBehaviour.IsInvoking

マニュアルに切り替える
public bool IsInvoking(string methodName);

パラメーター

説明

メソッドの呼出が保留中かどうか

using UnityEngine;
using System.Collections;

public class ExampleClass : MonoBehaviour { public Rigidbody projectile; void Update() { if (Input.GetKeyDown(KeyCode.Space) && !IsInvoking("LaunchProjectile")) Invoke("LaunchProjectile", 2); } void LaunchProjectile() { Rigidbody instance = Instantiate(projectile); instance.velocity = Random.insideUnitSphere * 5; } }

public bool IsInvoking();

説明

保留中のメソッドがあるかどうか