-
Notifications
You must be signed in to change notification settings - Fork 0
/
Spinner.cs
31 lines (29 loc) · 822 Bytes
/
Spinner.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
using UnityEngine;
using System.Collections;
namespace Assets.Code{
public class Spinner : MonoBehaviour {
void Start () {
GameObject.DontDestroyOnLoad(this.gameObject);
StartCoroutine(StartActivityIndicator());
}
IEnumerator StartActivityIndicator () {
#if UNITY_IPHONE
Handheld.SetActivityIndicatorStyle(UnityEngine.iOS.ActivityIndicatorStyle.WhiteLarge);
#endif
#if UNITY_ANDROID
Handheld.SetActivityIndicatorStyle(AndroidActivityIndicatorStyle.InversedLarge);
#endif
#if UNITY_IPHONE || UNITY_ANDROID
Handheld.StartActivityIndicator();
#endif
yield return null;
}
void OnLevelWasLoaded() {
#if UNITY_IPHONE || UNITY_ANDROID
Handheld.StopActivityIndicator();
#endif
// Debug.Log ("Usunięcie splash screena");
GameObject.Destroy(gameObject);
}
}
}