-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathBlobStorageConfig.cs
44 lines (40 loc) · 1.1 KB
/
BlobStorageConfig.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
32
33
34
35
36
37
38
39
40
41
42
43
44
using Azure.StorageServices;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityGLTF;
namespace Azure.StorageServices
{
public class BlobStorageConfig : MonoBehaviour
{
[Header("Azure config")]
[SerializeField]
private string azureAccount;
[SerializeField]
private string azureAppKey;
//
private StorageServiceClient client;
public BlobService Service { get; private set; }
private bool ready = false;
public bool Ready {
get
{
return ready;
}
}
// Use this for initialization
void Awake()
{
if (string.IsNullOrEmpty(azureAccount) ||
string.IsNullOrEmpty(azureAppKey))
{
Debug.LogError("Azure account and key required");
return;
}
// setup blob service
client = new StorageServiceClient(azureAccount, azureAppKey);
Service = new BlobService(client);
ready = true;
}
}
}