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

スクリプト言語

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

Image.fillAmount

フィードバック

ありがとうございます

この度はドキュメントの品質向上のためにご意見・ご要望をお寄せいただき、誠にありがとうございます。頂いた内容をドキュメントチームで確認し、必要に応じて修正を致します。

閉じる

送信に失敗しました

なんらかのエラーが発生したため送信が出来ませんでした。しばらく経ってから<a>もう一度送信</a>してください。ドキュメントの品質向上のために時間を割いて頂き誠にありがとうございます。

閉じる

キャンセル

マニュアルに切り替える
public var fillAmount: float;
public float fillAmount;

説明

Image.typeImage.Type.Filled に設定されているときに表示されている Image の数

範囲は 0-1 で、0 は何も表示されず、1 で完全に Image が表示されます。

#pragma strict
// Required when Using UI elements.
public class Cooldown {

public var cooldown; public var coolingDown; public var waitTime = 30.0f;

// Update is called once per frame function Update() { if (coolingDown == true) { //Reduce fill amount over 30 seconds cooldown.fillAmount -= 1.0f / waitTime * Time.deltaTime; } } }
using UnityEngine;
using System.Collections;
using UnityEngine.UI; // Required when Using UI elements.

public class Cooldown : MonoBehaviour { public Image cooldown; public bool coolingDown; public float waitTime = 30.0f;

// Update is called once per frame void Update () { if (coolingDown == true) { //Reduce fill amount over 30 seconds cooldown.fillAmount -= 1.0f/waitTime * Time.deltaTime; } } }