Merge branch 'main' of ssh://patema.crystalyx.net:2222/GameJams/Snaparazzi
This commit is contained in:
commit
b5e8c910a2
@ -1,9 +1,9 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using Firebase.Extensions;
|
||||
using Firebase.Storage;
|
||||
using TMPro;
|
||||
using UnityEditor.SceneManagement;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Networking;
|
||||
using UnityEngine.UI;
|
||||
@ -51,7 +51,7 @@ private void DisplayPicture(string _url)
|
||||
});
|
||||
}
|
||||
|
||||
private IEnumerator DownloadImage(string _url, System.Action<Texture> callback_OnTextureDownloaded)
|
||||
private IEnumerator DownloadImage(string _url, Action<Texture> callback_OnTextureDownloaded)
|
||||
{
|
||||
UnityWebRequest request = UnityWebRequestTexture.GetTexture(_url);
|
||||
yield return request.SendWebRequest();
|
||||
|
@ -1,8 +1,10 @@
|
||||
using Firebase.Database;
|
||||
using Firebase.Storage;
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Threading.Tasks;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Networking;
|
||||
|
||||
public class StorageManager : MonoBehaviour
|
||||
{
|
||||
@ -62,6 +64,20 @@ public void UploadPhoto(string roomCode, string playerId, int question, int prop
|
||||
.SetValueAsync(imageRef.Path);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public IEnumerator DownloadImage(string _url, Action<Texture> callback_OnTextureDownloaded)
|
||||
{
|
||||
UnityWebRequest request = UnityWebRequestTexture.GetTexture(_url);
|
||||
yield return request.SendWebRequest();
|
||||
|
||||
if (request.result != UnityWebRequest.Result.Success)
|
||||
{
|
||||
Debug.LogError(request.error);
|
||||
}
|
||||
else
|
||||
{
|
||||
callback_OnTextureDownloaded?.Invoke(((DownloadHandlerTexture)request.downloadHandler).texture);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,10 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<projectSettings>
|
||||
<projectSetting name="com.google.external-dependency-managerAnalyticsEnabled" value="False" />
|
||||
<projectSetting name="com.google.firebaseAnalyticsEnabled" value="False" />
|
||||
<projectSetting name="Google.IOSResolver.VerboseLoggingEnabled" value="False" />
|
||||
<projectSetting name="Google.PackageManagerResolver.VerboseLoggingEnabled" value="False" />
|
||||
<projectSetting name="Google.VersionHandler.VerboseLoggingEnabled" value="False" />
|
||||
<projectSetting name="GooglePlayServices.PromptBeforeAutoResolution" value="False" />
|
||||
<projectSetting name="GooglePlayServices.UseJetifier" value="True" />
|
||||
</projectSettings>
|
Loading…
Reference in New Issue
Block a user