Тёмный

Supabase with Unity 

ChangeNode
Подписаться 9 тыс.
Просмотров 2,9 тыс.
50% 1

Demonstration showing how to use Unity with Supabase. If you just want to use email/password or if you would also like to support the native Sign in with Apple functionality on iOS, this video will help you get started.
supabase.com/ - Postgres database, Auth, Storage, Edge functions, and more. Free & inexpensive hosting options as well as options that scale up for enterprise, including self-hosting and local dev tools.
github.com/supabase-community... - C# library to make it easy to use Supabase. Install this via the NuGetForUnity package below.
supabase.com/docs/guides/auth... - Instructions on getting started with Sign in with Apple using Supabase. If you have any familiarity with JavaScript or TypeScript I would suggest verifying that you can use Sign in with Apple functionality via a quick & dirty JS project - this will be easiest for Supabase support if you run into problems.
github.com/Cysharp/UniTask - Add proper support for C# async/await to Unity, which is used heavily by the supabase-csharp project. Be sure to install via the Unity Package manager via the Git URL method, not via NuGet.
github.com/GlitchEnzo/NuGetFo... - Use this to install supabase-csharp, along with needed dependencies.
developer.apple.com/ - Go here to sign up for an Apple Developer account.
developer.apple.com/documenta... - Technical information from Apple on Sign in with Apple. You'll use the on-device native dialog to Sign in with Apple on iOS, and Supabase uses the REST APIs on your behalf to handle the rest of the flow.
gist.github.com/wiverson/a202... - Gist of the SupabaseStuff.cs class from the demo video. If you just want to support email/password you can remove the Sign in with Apple stuff and presumably use the rest of Supabase everywhere - e.g. Windows, Linux, etc. My guess is that WebGL builds won't work, but that's just a guess.
gist.github.com/wiverson/8c7e... - Gist of the AppleSignIn.cs class from the demo video. This shows how to use the supabase-csharp classes to generate a nonce and a nonce hash, as well as how to invoke the native Sign in with Apple dialog.
Many thanks to github.com/acupofjose for adding the functionality to the github.com/supabase-community... library to complete the flow for the Sign in with Apple flow!
If you have any questions or wish to reach out, feel free to ping me at www.changenode.com/

Хобби

Опубликовано:

 

27 апр 2023

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 24   
@yxgen4
@yxgen4 Год назад
Thank you!!
@martin.m.kloeckener
@martin.m.kloeckener 10 месяцев назад
Thank you for this informative video! I'm not very familiar with databases: How do you host the Supabase database? On a website, on a server, ...?
@ChangeNode
@ChangeNode 10 месяцев назад
You can use supabase.com for a hosted server. There's a free tier and a $25/month tier. You can also self-host if you want, but you should be pretty comfortable with Docker IMHO. You can also use the Supabase CLI to run it locally for development. Glad you liked the video - gotten a bit swamped but looking to do more soon. :)
@martin.m.kloeckener
@martin.m.kloeckener 10 месяцев назад
@@ChangeNode I see. The hosted server is probably the most straight forward way to start. I want to create a Unity App that restricts some content behind a paywall. Users should be able to sign up on a website, subscribe and then log-in in the app. How would you tackle this, speaking from more high level perspective? Is this possible with Supabase? I'm a Unity dev but have pretty much no experience with web development. Do you know if there are any Wordpress plugins that would help?
@ChangeNode
@ChangeNode 10 месяцев назад
@@martin.m.kloeckener You can absolutely do this with Supabase, but you would also likely need a web developer. The subscription stuff alone is non-trivial to do - I'd suggest checking out RevenueCat for subscriptions. You might want to just combine RevenueCat with Unity and skip the website side for now, depending on your experience/resources. Another angle would be to look at a ton of different web app tools. Lots and lots of options, just depends.
@martin.m.kloeckener
@martin.m.kloeckener 10 месяцев назад
Thank you, that helps a lot! 🤗
@boogetow3484
@boogetow3484 9 дней назад
Does it work in linux servers?
@aless.c064
@aless.c064 9 месяцев назад
Hi, I tried to do this by installing the supabase package with nuGet but I get a couple errors when opening nuGet for unity and I also get a burst error every time I compile sctipts
@ChangeNode
@ChangeNode 9 месяцев назад
Yup, that means NuGet is pulling in too many dependencies. Good news tho, last week I posted an updated template with all of the config updated. Check it out: github.com/wiverson/supabase-unity-template The template defaults to talking to a local Supabase CLI instance. Right-click in Assets, create a new Settings, and drop that in to point to your Supabase instance. New video soon hopefully!
@zpinacz
@zpinacz 6 месяцев назад
I am using UniRx in my unity project and it makes it incompatible with the supabase-unity as it requires the System.Reactive.dll :/ Would be great to see supabase sdk without this dependency.
@ChangeNode
@ChangeNode 5 месяцев назад
I'm not sure, you can try playing with adding/removing the libs manually and see if that helps.
@KaushalAgrawal86
@KaushalAgrawal86 10 месяцев назад
Got google signin working with supabase unity on my android project. Any idea on how to implement facebook login? Using facebook unity package, it gives acces token, whis is not a jwt token. How to do FB login.
@ChangeNode
@ChangeNode 10 месяцев назад
I think the only way to do that is with a WebView. Basically you open up a WebView to start the flow and then include a callback URL that points back to the app via deeplink at end of the process. You then can get the arguments back from the deeplink and use those to complete the flow.
@KaushalAgrawal86
@KaushalAgrawal86 10 месяцев назад
@@ChangeNode thanks
@Larni_Frey
@Larni_Frey 5 месяцев назад
Can it work with WebGL unity?
@ChangeNode
@ChangeNode 5 месяцев назад
Haven't tried it. If you are publishing to WebGL I'd suggest looking at using the standard Supabase JS SDK and then injecting the session token into the Unity game, but YMMV. The OAuth flow via the JS SDK is likely a cleaner/easier version. FWIW I'm using SvelteKit w/Supabase and thumbs up from me on that.
@macawls
@macawls 4 месяца назад
Any updates?
@Larni_Frey
@Larni_Frey 4 месяца назад
@@macawls nope
@ChangeNode
@ChangeNode 4 месяца назад
@@macawls hmm. The docs for supabase-csharp got updated with a bunch more info on Unity. Plus I posted a template Unity project. Check the more recent video on my channel and the supabase-csharp docs for some more update info. Other than that no updates WRT WebGL Unity specifically. I suppose if you have a few cycles you could try downloading the template, flip it to WebGL and see how it goes. If you run into issues or Qs you can post them in the supabase-csharp discussion and I and some of the folks who maintain the repo can take a look.
@macawls
@macawls 4 месяца назад
@@ChangeNode I had some problems with dlls (only webgl) so the best option I can think of rn is just doing all supabase logic in unity cloud code
@JorgeCastellonJr
@JorgeCastellonJr Год назад
You can't see the supabase function. 1:50
@ChangeNode
@ChangeNode Год назад
Sorry, big ol' head is in the way. ;) SQL version: select 'hello world'; JS version: let output = `Hello, ${name}!`; return output;
Далее
Tips for Dealing with Legacy Code
25:21
Просмотров 585
Incredible Wheel Restoration Process 🚙
01:00
Просмотров 1,3 млн
ИСПОЛНЯЮ МЕЧТУ Анастасиз
34:51
Просмотров 871 тыс.
Q&A: When will the Tech Jobs come back?
19:29
Просмотров 11 тыс.
Tips For How to Get a Java Developer Job in 2024
16:46
AI and UBI: A Future Together?
11:37
Просмотров 2 тыс.
Developers: Pivot to video games?
10:44
Просмотров 20 тыс.
This UI component library is mind-blowing
8:23
Просмотров 591 тыс.
Developers: Pivot to Robotics?
22:21
Просмотров 44 тыс.
When Will The Tech Jobs Come Back?
11:25
Просмотров 182 тыс.
I tried 5 Firebase alternatives
10:31
Просмотров 755 тыс.
The Future of Software Development?
15:06
Просмотров 19 тыс.
Странный сбор подсолнуха 🌻
0:24
#beliveinyourself #TikTok
0:20
Просмотров 16 млн
Пена из арбуза 🤯
0:25
Просмотров 2,7 млн