Version: 2017.1

Application.GetStreamProgressForLevel

Switch to Manual
public static float GetStreamProgressForLevel (int levelIndex);

Description

Как далеко прогресс загрузки? [0...1].

В веб плеере это возвращает прогресс этого уровня.

See Also: Функция CanStreamedLevelBeLoaded.

using UnityEngine;
using System.Collections;

public class ExampleScript : MonoBehaviour { public float percentageLoaded = 0; public GUIText progressText;

// Print on a guiText how much has been streamed level at index 1 // When finished streaming, print "Level 1 has been fully streamed!" void Start() { progressText = GetComponent<GUIText>(); }

void Update() { if (Application.GetStreamProgressForLevel(1) == 1) { progressText.text = "Level at index 1 has been fully streamed!"; } else { percentageLoaded = Application.GetStreamProgressForLevel(1) * 100; progressText.text = percentageLoaded.ToString(); } } }

Webplayer support is not part of 5.4.0 and later.


public static float GetStreamProgressForLevel (string levelName);

Description

Как далеко прогресс загрузки? [0...1].

В веб плеере это возвращает прогресс этого уровня.

See Also: Функция CanStreamedLevelBeLoaded.

Webplayer support is not part of 5.4.0 and later.