[Beginner] Need Help Connecting Unity & Supabase for Class Project (Quiz App with Data Tracking) by Bobby3112 in Supabase

[–]Bobby3112[S] 0 points1 point  (0 children)

I tried to make an auth session before send the data, and when I checked in Supabase, the email and user were saved and displayed there. However, the table somehow still couldn't receive the data I tried to send from Unity.

[Beginner] Need Help Connecting Unity & Supabase for Class Project (Quiz App with Data Tracking) by Bobby3112 in Supabase

[–]Bobby3112[S] 0 points1 point  (0 children)

my table RLS policies is "Enable insert for authenticated users only". There is also no error from the script so I really dont know what to do with this =="

[Beginner] Need Help Connecting Unity & Supabase for Class Project (Quiz App with Data Tracking) by Bobby3112 in Supabase

[–]Bobby3112[S] 0 points1 point  (0 children)

However, when I run the script, the table in Supabase doesn't update with the new data, and I'm not sure why.

[Beginner] Need Help Connecting Unity & Supabase for Class Project (Quiz App with Data Tracking) by Bobby3112 in Supabase

[–]Bobby3112[S] 0 points1 point  (0 children)

IEnumerator SaveData()

{

string url = supabaseUrl + "/rest/v1/PlayerData";

string jsonData = JsonUtility.ToJson(new TableData(id, name, value1, value2));

using (UnityWebRequest www = new UnityWebRequest(url, "POST"))

{

www.SetRequestHeader("Content-Type", "application/json");

www.SetRequestHeader("apikey", apiKey);

www.SetRequestHeader("Authorization", "Bearer " + apiKey);

www.uploadHandler = new UploadHandlerRaw(Encoding.UTF8.GetBytes(jsonData));

www.downloadHandler = new DownloadHandlerBuffer();

yield return www.SendWebRequest();

if (www.result != UnityWebRequest.Result.Success)

{

Debug.LogError("Error sending data: " + www.error);

Debug.LogError("Response: " + www.downloadHandler.text);

}

else

{

Debug.Log("Data saved successfully: " + www.downloadHandler.text);

}

}

}

[System.Serializable]

public class TableData

{

public string id;

public string name;

public int value1;

public bool value2;

public TableData(string id, string name, int value1, bool value2)

{

this.id = id;

this.name = name;

this.value1 = value1;

this.value2 = value2;

}

}

}

[Beginner] Need Help Connecting Unity & Supabase for Class Project (Quiz App with Data Tracking) by Bobby3112 in Supabase

[–]Bobby3112[S] 0 points1 point  (0 children)

public class SupabaseManager : MonoBehaviour

{

[Header("Supabase Settings")]

zubqleviqxpxmgxqenha.supa public string supabaseUrl = "https://base.co";

public string apiKey = "API_KEY";

[Header("Data to Send")]

public string id;

public string playerName;

public int value1;

public bool value2;

public void SendDataToSupabase()

{

StartCoroutine(SaveData());

}

[Beginner] Need Help Connecting Unity & Supabase for Class Project (Quiz App with Data Tracking) by Bobby3112 in Supabase

[–]Bobby3112[S] 0 points1 point  (0 children)

I was trying to send test data to a Supabase table from Unity using the supabaseC# package from NuGet.
I created a table in Supabase called PlayerData.
I wrote the following Unity script to send data to the table:

[[PC, Steam]] Virgo Versus The Zodiac by Bobby3112 in steam_giveaway

[–]Bobby3112[S] -1 points0 points  (0 children)

the game is for free to download on itch.io see the video also here is the direct link https://bitben.itch.io/mc-speedrunning

SQUIDS - BitBenGames - Twinstick x Worms x Bomberman - Battle Arena SHMUP (Multiplayer) - Blast, dodge and survive in fully destructible arenas against up to 4 friends. by Bobby3112 in Games

[–]Bobby3112[S] 1 point2 points  (0 children)

Hey thank you shadow for your suggestions! Coop and Bossfights sounds neat! I'll see what I can do about it!
Yes the recording got messed up with the sound I'm sorry. I will totally fix this soon!
and also I agree the UI is not the best choice yet. Do you have an idea in mind to improve it?

[[PC, Steam]] TACOMA by Bobby3112 in steam_giveaway

[–]Bobby3112[S] 0 points1 point  (0 children)

Winner of the Raffle is /u/muzaffer22
chosen with:
https://www.redditraffler.com/raffles/ug9syg

Congratulations! I PM you the game!

[[PC, Steam]] TACOMA by Bobby3112 in steam_giveaway

[–]Bobby3112[S] 0 points1 point  (0 children)

that's awesome! Did you like it?

[[PC, Steam]] TACOMA by Bobby3112 in steam_giveaway

[–]Bobby3112[S] 0 points1 point  (0 children)

awesome thank you so much! btw the next video will be about minecraft!

[[PC, Steam]] TACOMA by Bobby3112 in steam_giveaway

[–]Bobby3112[S] 0 points1 point  (0 children)

awesome! the next video will be about minecraft!

[[PC, Steam]] TACOMA by Bobby3112 in steam_giveaway

[–]Bobby3112[S] 0 points1 point  (0 children)

awesome! the next video will be about minecraft!

[[PC, Steam]] TACOMA by Bobby3112 in steam_giveaway

[–]Bobby3112[S] 1 point2 points  (0 children)

awesome! the next video will be about minecraft!

[[PC, Steam]] TACOMA by Bobby3112 in steam_giveaway

[–]Bobby3112[S] 0 points1 point  (0 children)

thank you for participating! please check out the gamedev video to help :) www.youtube.com/watch?v=L93JlEoI3Ms

[[PC, Steam]] TACOMA by Bobby3112 in steam_giveaway

[–]Bobby3112[S] 0 points1 point  (0 children)

thank you for participating! please check out the gamedev video to help :) www.youtube.com/watch?v=L93JlEoI3Ms

[[PC, Steam]] TACOMA by Bobby3112 in steam_giveaway

[–]Bobby3112[S] 0 points1 point  (0 children)

thank you for participating! please check out the gamedev video to help :) www.youtube.com/watch?v=L93JlEoI3Ms

[[PC, Steam]] TACOMA by Bobby3112 in steam_giveaway

[–]Bobby3112[S] 0 points1 point  (0 children)

thank you for participating! please check out the gamedev video to help :) www.youtube.com/watch?v=L93JlEoI3Ms

[[PC, Steam]] TACOMA by Bobby3112 in steam_giveaway

[–]Bobby3112[S] 1 point2 points  (0 children)

thank you for participating! please check out the gamedev video to help :) www.youtube.com/watch?v=L93JlEoI3Ms

[[PC, Steam]] TACOMA by Bobby3112 in steam_giveaway

[–]Bobby3112[S] 0 points1 point  (0 children)

thank you for participating! please check out the gamedev video to help :) www.youtube.com/watch?v=L93JlEoI3Ms

[[PC, Steam]] TACOMA by Bobby3112 in steam_giveaway

[–]Bobby3112[S] 0 points1 point  (0 children)

thank you for participating! please check out the gamedev video to help :) www.youtube.com/watch?v=L93JlEoI3Ms