diff --git a/Assets/Scripts/StorageManager.cs b/Assets/Scripts/StorageManager.cs index f7302e9..f5705a7 100644 --- a/Assets/Scripts/StorageManager.cs +++ b/Assets/Scripts/StorageManager.cs @@ -6,6 +6,7 @@ public class StorageManager : MonoBehaviour { + public GameObject managers; private StorageReference storage; private DatabaseReference realtimeDB; @@ -35,10 +36,10 @@ void Update() public void UploadPhoto(string roomCode, string playerId, int question, int proposition) { - Texture2D photo = gameObject.GetComponent().GetPhoto(); + Texture2D photo = managers.GetComponent().GetPhoto(); byte[] photoBytes = ImageConversion.EncodeToJPG(photo); - GameManager game = gameObject.GetComponent(); + GameManager game = managers.GetComponent(); string imageUuid = Guid.NewGuid().ToString(); StorageReference imageRef = storage.Child($"{roomCode}/{playerId}/{imageUuid}.png");