Unity Authentication in 100 SECONDS! (Log in, Anonymous, Unity Gaming Services, Cloud Save, Relay)

  Рет қаралды 45,171

Code Monkey

Code Monkey

Күн бұрын

❤ Watch my FREE Complete Multiplayer Course • Learn Unity Multiplaye...
🌍 Get my Complete Courses! ✅ unitycodemonke...
👍 Learn to make awesome games step-by-step from start to finish.
👇 Click on Show More
🎮 Get my Steam Games unitycodemonke...
🌍 Unity Authentication Docs docs.unity.com...
🔴 RELATED VIDEOS 🔴
Unity Gaming Services? Free Unity Multiplayer? Backend? Monetization? • Free Unity Multiplayer...
Ultimate Unity Overview (50+ Tools and Features Explained!) • Ultimate Unity Overvie...
💬 Learn how to use Unity Authentication, it lets you sign in your player (anonymously and without friction), and generate a unique user id which you can then use to interact with all the various Unity Gaming Services like Cloud Save, Multiplayer, Relay, Matchmaker, etc.
Alternatively you can also link with a third party id like Google, Apple, Steam and Facebook.
📝 Some Links are Affiliate links which means it costs the same to you and I get a nice commission.
🌍 Get Code Monkey on Steam!
👍 Interactive Tutorials, Complete Games and More!
✅ store.steampow...
If you have any questions post them in the comments and I'll do my best to answer them.
🔔 Subscribe for more Unity Tutorials / @codemonkeyunity
See you next time!
📍 Support on Patreon / unitycodemonkey
🎮 Grab the Game Bundle at unitycodemonke...
📝 Get the Code Monkey Utilities at unitycodemonke...
#unitytutorial #unity3d #gamedev
--------------------------------------------------------------------
Hello and Welcome!
I'm your Code Monkey and here you will learn everything about Game Development in Unity using C#.
I've been developing games for several years with 8 published games on Steam and now I'm sharing my knowledge to help you on your own game development journey.
I do Unity Tutorials on just about every topic, Unity Tutorials for Beginners and Unity Tutorials for Advanced users.
You can see my games at www.endlessloopstudios.com
--------------------------------------------------------------------
- Other great Unity channels:
Unity - / unity3d
Brackeys - / brackeys
Dani - / @danidev
Jabrils - / @jabrils
BlackthornProd - / @blackthornprod
Sykoo - / sykootv
Jason Weimann - / @unity3dcollege
Jonas Tyroller - / @jonastyroller
--------------------------------------------------------------------
- Website: unitycodemonke...
- Twitter: / unitycodemonkey
- Steam: store.steampow...

Пікірлер: 94
@CodeMonkeyUnity
@CodeMonkeyUnity 2 жыл бұрын
❤ Watch my FREE Complete Multiplayer Course kzbin.info/www/bejne/bZjPdKZ8bsupadU 💬 Do you like this format? Could be useful for super quick overviews of certain tools, let me know. 🌍 Get my Complete Courses! ✅ unitycodemonkey.com/courses 🎮 Need Realistic Fantasy visuals? Check out this HumbleBundle 96% OFF! www.humblebundle.com/software/ultimate-unity-fantasy-rpg-bundle-software?partner=codemonkey 🌍 Unity Authentication Docs docs.unity.com/authentication/ 🔴 RELATED VIDEOS 🔴 Unity Gaming Services? Free Unity Multiplayer? Backend? Monetization? kzbin.info/www/bejne/gKimnXaZZ8SteZo Ultimate Unity Overview (50+ Tools and Features Explained!) kzbin.info/www/bejne/fpWZfGqjm72nZpo
@chuckdude514
@chuckdude514 2 жыл бұрын
I do. As a matter of fact, your Unity Ultimate Course is one of my favorites among the courses I have!
@SamarthCat
@SamarthCat 2 жыл бұрын
Just curious, did you get inspired from fireship for the 100 seconds idea?
@CodeMonkeyUnity
@CodeMonkeyUnity 2 жыл бұрын
@@chuckdude514 I'm glad you enjoy it! Stay tuned for another free update very soon!
@CodeMonkeyUnity
@CodeMonkeyUnity 2 жыл бұрын
​@@SamarthCat Heh yup I love those videos, really awesome to get a quick overview of a language/toolset. When I saw how quickly this tool can be set up I thought about trying out a similar super quick format
@Tactic3d
@Tactic3d 2 жыл бұрын
Yes, very interesting format, to discover a tool/plugin.
@Robertganca
@Robertganca 2 жыл бұрын
I knew about Unity services, but I didn’t know about anonymous login. And it can apparently be connected to Steam, nice. Thanks for the tip.
@michaelp8376
@michaelp8376 Жыл бұрын
This is great info, thank you! To answer your question: no, the format was horrible =). Personally, I do not care if it is under 100 seconds. I do care if it is simple and to the point. A 5 minute video is better than a 1 minute video if it is more clear to the user.
@TheOneWithComments
@TheOneWithComments 2 жыл бұрын
This made me realize how little I know about this topic ;-; I hope you are planning on doing longer videos on this topic because I think it would be very helpful
@CodeMonkeyUnity
@CodeMonkeyUnity 2 жыл бұрын
I'm definitely planning on covering several UGS tools which have this Auth requirement as the starting point
@doublehitgames531
@doublehitgames531 Жыл бұрын
Please, do a full tutorial about Authentifaction and Cloud Save. Starting with a Anonimous login, saving and loading clud data saved and using anonymous id for register to a provider like as google account. This will be amasing!
@reaporofdragon744
@reaporofdragon744 Жыл бұрын
I'm getting 2 errors can anyone help me ?? first error is cs0161 and the second one is cs0246 its on the async Task SignInAnonymouslyAsync Edit: Found it it needs this in the script using System.Threading.Tasks;
@Steve-gi2yj
@Steve-gi2yj Жыл бұрын
big thank you, I asked about that but youtube/code monkeys removed my question/comment.
@allaboutpaw9396
@allaboutpaw9396 Жыл бұрын
Loved it. I made it anonymous but then I am having trouble to connect it to Google, Steam etc... The documentation lacks in many ways. Could you provide a tutorial for that? There is no tutorial on youtube for this as of today. Thanks
@AisnerA
@AisnerA Жыл бұрын
+1
@jrpenanueva1479
@jrpenanueva1479 Жыл бұрын
yup, I hope @Code Monkey creates tutorial for fb and google.
@akash_the_phenomenal
@akash_the_phenomenal 2 жыл бұрын
Please make complete tutorial series on this whole new unity services.
@j.j.maverick9252
@j.j.maverick9252 2 жыл бұрын
incredibly useful and more simple than I expected! Thanks again!
@DwightPotvin
@DwightPotvin Жыл бұрын
I may have missed it, but could you possible do a tutorial on how to properly authenticate a steam ID using Unity Authentication? I tried to use the code they have on the website and I just an invalid token error so clearly I am doing something wrong lol
@94Kansas
@94Kansas 2 жыл бұрын
Nice video and format to discover some new feature! It would be great to see how save cloud works, since I don't know a good method to cloud save for Apple and Android multiplaform. Thanks!
@CodeMonkeyUnity
@CodeMonkeyUnity 2 жыл бұрын
Yup Cloud Save is indeed the UGS tool that I was researching when I saw the requirement for Authentication so that lead me to researching this
@michailmarkou1995
@michailmarkou1995 2 жыл бұрын
StraightForward Tutorial!!!
@parsagg_player8885
@parsagg_player8885 Жыл бұрын
please make a full tutorial video about unity cloud save & cloud code
@doublehitgames531
@doublehitgames531 Жыл бұрын
Yes i want this too
@marwaneh5277
@marwaneh5277 2 жыл бұрын
Why you don't uses dark theme
@j.j.maverick9252
@j.j.maverick9252 2 жыл бұрын
this was asked on a different video recently, Hugo says it’s because dark mode hurts his eyes. If you struggle with the white, try turning your device screen brightness down… modern screens are much too bright by default (unless you’re in bright daylight) so I keep mine at less than 50 brightness
@CodeMonkeyUnity
@CodeMonkeyUnity 2 жыл бұрын
Because dark mode burns my eyes, sorry
@r6scrubs126
@r6scrubs126 2 жыл бұрын
@@j.j.maverick9252 you're not kidding. I have mine set to literally as low as it will go and its still too bright sometimes
@Synith19
@Synith19 2 жыл бұрын
Thanks for this.
@michelvarilek1244
@michelvarilek1244 2 жыл бұрын
Thank you for this short tutorial! I have been looking into Unity Authentication recently. Do you know if this is a good alternative to the somewhat recently deprecated feature of reading the serial number on Android devices to identify devices? I am working on device-bound licensing for a VR application (on Quest and Pico) and since the unique serial number (since android level 29) is not accessible anymore, it seems to me the best alternative is to create a unique identifier on the device and store it somewhere safe/hidden - which Unity Authentication also seems to be doing.
@CodeMonkeyUnity
@CodeMonkeyUnity 2 жыл бұрын
If you use anonymous log in then yeah this is essentially a device identifier. Although if the user clears their cache and deletes Unity's PlayerPrefs then the id is lost and a new one is generated the next time they open the game. So if your concern is something secure that the user cannot change then I don't think this will work.
@jacobbender974
@jacobbender974 2 жыл бұрын
@Code Monkey - curious (if you have experience with either) how you think this lineup of services compares against PlayFab/GameSparks - a lot of these things seem to be Unity wanting to provide direct offerings in-house. I use PlayFab for my own projects and a lot of what I have seen from Unity Services seem to match 1:1.
@CodeMonkeyUnity
@CodeMonkeyUnity 2 жыл бұрын
I'm aware those services exist, Playfab seems to be very popular, but never used it myself so can't really comment on a direct comparison. Playfab has existed for a long time so it's pretty mature by now, UGS is newer but Unity seems to be focusing heavily on it. I've been researching some services and so far everything seems pretty great, easy to use, and great pricing. Although for example, there's no Leaderboards or any kind of global accessible data (which I think Playfab has), and Cloud Save has some weird limitations (16KB per file), so perhaps Playfab is the more feature-rich toolset at this time.
@jacobbender974
@jacobbender974 2 жыл бұрын
@@CodeMonkeyUnity Appreciate the response (and your content in general) - I guess my hesitation is the history Unity has of saying they will support/invest into something and then it being deprecated a year later. The way they handled removing UNET left a bad taste. I think I will stick with PF for now, but maybe these services will prove an exception to that rule. One thing I will say though, is this seems like a good way to vendor lock yourself into a backend, given the tight integration with the Unity Engine specifically - if you ever switched engines, I wonder if it would even be possible to use these services...
@CodeMonkeyUnity
@CodeMonkeyUnity 2 жыл бұрын
​@@jacobbender974 Most of the UGS are actually engine agnostic, they have simple APIs to work with any engine. Famously Apex Legends uses Multiplay, Vivox, Matchmaker, and it's not made in Unity. But I understand your concern, although Unity is pushing hard for UGS to gain adoption and with a pay as you go model I don't think they will leave these tools at all, it feels like they're pushing hard for these tools to become one of their main revenue sources so I believe they will support them with all their resources for a long time.
@kdeger
@kdeger 2 жыл бұрын
I know this is a UGS video but for leaderboard, tournaments etc I can suggest Nakama(Heroic Labs, the guys created Godot), an open source service, also provides a cloud service too called Heroic Cloud
@samuelkohn7282
@samuelkohn7282 2 жыл бұрын
seems great !
@aussieraver7182
@aussieraver7182 Жыл бұрын
Legend!
@Developer_rapfa
@Developer_rapfa Жыл бұрын
how to retrive data from a spcefic user? i mean i can only load data from my own ID , how can u access to other id's? as an admin i mean
@XboxPlayerPL
@XboxPlayerPL 2 жыл бұрын
Playfab authentication, please!
@CodeMonkeyUnity
@CodeMonkeyUnity 2 жыл бұрын
Playfab is something I'd like to research
@XboxPlayerPL
@XboxPlayerPL 2 жыл бұрын
@@CodeMonkeyUnity It's really, really good. I started using it a few days ago, and managed to run my own server build!
@MisterCrispyFL
@MisterCrispyFL 2 жыл бұрын
Wait a sec… since when does Unity support async/await?! Every tutorial I’ve ever come across talks about using that CoRoutine junk. Is this just for the login stuff or was it added and no one updated their tutorials?
@CodeMonkeyUnity
@CodeMonkeyUnity 2 жыл бұрын
I has supported it for a long time, Unity is currently on C# 9 I believe, although yeah it's not widely used, some other async Unity tools, like Addressables, use callbacks instead of directly async await.
@MisterCrispyFL
@MisterCrispyFL 2 жыл бұрын
@@CodeMonkeyUnity You have made my whole month, dude.
@Jobzachariah
@Jobzachariah Жыл бұрын
@CodeMonkeyUnity Is there a way to see in unity dasboard the details of users who have used anonymous login (userID's just like in firebase database)
@CodeMonkeyUnity
@CodeMonkeyUnity Жыл бұрын
What details? Like PC specs? You can see that if you also implement Analytics
@crashzzalex9218
@crashzzalex9218 Жыл бұрын
sign in anonymous, but if user change phone?
@CodeMonkeyUnity
@CodeMonkeyUnity Жыл бұрын
If you only sign in anonymously then it will only be stored locally on that phone. If you want to allow the player to switch devices you need to use one of the persistent sign in methods.
@TheIronicRaven
@TheIronicRaven Жыл бұрын
Is this something that is done server side, or client side? If I have my server running and a player joins in, would I attach the authentication code to the server player that spawns, or to the client one? It makes the most sense to me to be the server side, but I am not sure which one it is targeting.
@CodeMonkeyUnity
@CodeMonkeyUnity Жыл бұрын
This is to identify the client, it's not strictly related to multiplayer, for example you authenticate the player and then use Cloud Save to retrieve a save file.
@EnderElohim
@EnderElohim 2 жыл бұрын
how it used for making multiplayer game?
@CodeMonkeyUnity
@CodeMonkeyUnity 2 жыл бұрын
This is used for generating a user id, with that then you can identify the user in the various UGS tools like Relay/Lobby/Multiplay/Matchmaker
@EnderElohim
@EnderElohim 2 жыл бұрын
@@CodeMonkeyUnity A video about multiplayer useage would be amazing. So can you like get the information of all other users id and do stuff with it? Hmm interesting
@r6scrubs126
@r6scrubs126 2 жыл бұрын
so what's the purpose of an anonymous logon? If its anonymous that means it doesn't identify the user, so how can you get their cloud saves etc?
@r6scrubs126
@r6scrubs126 2 жыл бұрын
reading up on it some more on the unity docs and I *think* the way it works is that if you do an anonymous logon it will generate an account on the unity servers that can only be logged in to using a token that gets downloaded to the user's device the first time your game performs an anonymous logon. So if they used a different device they would not be recognised and wouldn't have access to those old cloud saves etc, which to me defeats the point of all of this. I guess this is only useful if you just want to use their service to do P2P relaying or something that does not actually depend on identifying the user (although in which case, why do you even need to do any kind of authentication at all)
@r6scrubs126
@r6scrubs126 2 жыл бұрын
oh right yeah their documentation basically says its just to lure people in lol "Once a player becomes invested in your game, prompt the player to upgrade their anonymous account to sign in with a platform account. A benefit of signing in with a platform account makes a player’s game progress recoverable if they want to switch devices and continue playing, or access items gained or purchased in the game."
@CodeMonkeyUnity
@CodeMonkeyUnity 2 жыл бұрын
It identifies the user with a unique id but knows nothing else about the user (name, email, etc) Yes being anonymous means it's not multi-device, but just having that player id on that one device already allows you to interact with various UGS like Relay, Mathcmaker, Lobby, Multiplay, Cloud Save, Economy, IAP, etc
@r6scrubs126
@r6scrubs126 2 жыл бұрын
@@CodeMonkeyUnity yeah for relay etc I can see it being useful but anonymous cloud save is completely pointless isn't it? What use is a cloud save if you can't access it from another device (or even the same device that has had the game or OS reinstalled)
@BrahimHadriche
@BrahimHadriche 2 жыл бұрын
@@r6scrubs126 The point of the anonymous login is to give the player an identifier so they can do things related to these services without having to manually input their info, so it's a less disruptive experience (e.g. they can start playing right away) later they can "link" their account with an actual social login, which will allow them to "preserve" that previous progress they did while they were anonymous. This is useful to engage the player with the gameplay first, and allow them later to login (so they can continue their progress on a different device for example)
@Etka06
@Etka06 2 жыл бұрын
Very useful feature I will definitely use this in my future projects thank you Codemonkey
@Steve-gi2yj
@Steve-gi2yj Жыл бұрын
Sorry I have a question, I am trying to setup OpenID, however its asking info on it, do I just make the info up? make my own Oidc name, client ID and OIDCName html? I tried making or inputting stuff and i get "Invalid OIDC Parameter". any thoughts?
@CodeMonkeyUnity
@CodeMonkeyUnity Жыл бұрын
I haven't tried building OpenID from scratch so not entirely sure but yes if you're creating it then you define what name it has and whatever other info it needs. Maybe one of the parameters is some key that needs to be generated in some specific way? Really not sure.
@Steve-gi2yj
@Steve-gi2yj Жыл бұрын
@@CodeMonkeyUnity awesome thanks for answering, i will try this out and let you know, maybe something as simple... and i will pass on any info i find. thanks again :)
@carlosbautista2392
@carlosbautista2392 11 ай бұрын
Hey Could you this one over ... just a little slower. a little more in depth. Thanks !
@CodeMonkeyUnity
@CodeMonkeyUnity 11 ай бұрын
What would you like to know more in depth? There's not much depth to this package, you just sign in and that's it
@force.4game649
@force.4game649 2 жыл бұрын
We want to see facebook and google sign in metods thanks a lot!
@TommyTheITGuy
@TommyTheITGuy 2 жыл бұрын
Trying out the Fireship video format? :)
@CodeMonkeyUnity
@CodeMonkeyUnity 2 жыл бұрын
Heh kind of, I love those videos and when I saw how quickly this tool can be set up I thought it would be perfect to experiment with this format.
@davk
@davk Жыл бұрын
You could increase speed of this video by 2 and it would be in 50 seconds! Still useless.
@CodeMonkeyUnity
@CodeMonkeyUnity Жыл бұрын
How is it useless? What part can't you understand?
@davk
@davk Жыл бұрын
@@CodeMonkeyUnity Thank you for your reply. Sure, let me explain. I am a beginner and you say "register to authentication events", "make a function to sign anonymously", " you can link it later to user accounts" etc. Yeah, I can watch other videos that will tell me how to do it. This video didn't teach me anything. None of the functions from the title in brackets are explained. Therefore this was useless to me.
@genius-b1180
@genius-b1180 Жыл бұрын
Is it ok for unity desktop apps?
@CodeMonkeyUnity
@CodeMonkeyUnity Жыл бұрын
Sure, this works with any platform that Unity supports
@mcgator1208
@mcgator1208 Жыл бұрын
Can you make a more elaborate video
@MichaelEvanspishposh
@MichaelEvanspishposh 2 жыл бұрын
I'd assume using OpenID would be cross platform
@CodeMonkeyUnity
@CodeMonkeyUnity 2 жыл бұрын
Heh yup I believe that would work, they literally added that option 2 days after I published this video, I definitely want to research that because I think it does indeed enable cross platform
@alperensisman6002
@alperensisman6002 2 жыл бұрын
This video is easy way. Make a video with in google auth and facebook auth. I am challenge you !
@chaostellar
@chaostellar 2 жыл бұрын
Nice
@illsaveus
@illsaveus Жыл бұрын
Is there a way for a player to setup a username and password without using any of their google/Facebook/apple/steam accounts? Basically just enter a username and password to create an account.
@CodeMonkeyUnity
@CodeMonkeyUnity Жыл бұрын
Now this system supports OpenID so I think you could build your own OpenID provider
@illsaveus
@illsaveus Жыл бұрын
@@CodeMonkeyUnity this whole aspect of user auth is so confusing. Could you do a video explaining it? I’m trying to understand how to add a simple username/password safely without having ppl opt in to have their social media connected and tracked. But I’m so lost in the weeds doing AWS Cognito stuff but maybe OpenID through UGS is better. 🤷
@OneKekc
@OneKekc 2 жыл бұрын
Why you write private start?
@CodeMonkeyUnity
@CodeMonkeyUnity 2 жыл бұрын
I like to be as explicit as possible in my code so I always add private instead of omitting it.
@chaostellar
@chaostellar 2 жыл бұрын
Is it hackable?
@CodeMonkeyUnity
@CodeMonkeyUnity 2 жыл бұрын
Not sure what you mean by "hackable", it's a unique id and an access token, without the access token you cannot impersonate another persons id
@chaostellar
@chaostellar 2 жыл бұрын
That answers my question, thanks
@diadetediotedio6918
@diadetediotedio6918 2 жыл бұрын
Literally everything is "hackable"
@hammadahmad462
@hammadahmad462 2 жыл бұрын
Authentication Successful in 99 sec. Damn
@everythingbyisaac
@everythingbyisaac 2 жыл бұрын
How do you get Kite for visual studio code or can you still get it
@talismanskulls2857
@talismanskulls2857 Жыл бұрын
Literally do not see (and have tried for over a year now) to add a character selection to the registration. I have asked all over the place how to integrate them. I either get "Google it" or some other nonsense of "it should be simple but no one is going to hold you hand." I am not asking for a hand hold. I am asking for guidance how to do that correctly leaving me to assume no one actually has a clue and its frustrating. I can create one or the other but can't integrate them. I know I am not the only one with that issue.
@bigcaka7725
@bigcaka7725 9 ай бұрын
what are you asking for? "add a character selection to the registration" what does that mean.
Unity AUDIO Volume Settings Menu Tutorial
9:24
Rehope Games
Рет қаралды 66 М.
Ozoda - Lada (Official Music Video)
06:07
Ozoda
Рет қаралды 9 МЛН
Пришёл к другу на ночёвку 😂
01:00
Cadrol&Fatich
Рет қаралды 11 МЛН
I Paid Fiverr Game Developers to Make the Same Game
10:25
BadGameDev
Рет қаралды 699 М.
I Wish I Had Known This Before I Started Unity Game Development...
11:11
Can AI code Flappy Bird? Watch ChatGPT try
7:26
candlesan
Рет қаралды 9 МЛН
Why Slopes are Shockingly Difficult for Indie Game Devs
17:20
Inbound Shovel
Рет қаралды 147 М.
How to use Addressables FASTER Loading FREE Memory SMALL Download
27:46
Tierlisting the BEST (and worst) GAME ENGINES
33:51
BiteMe Games
Рет қаралды 225 М.
How To Make a VR Multiplayer Game - Unity Netcode
23:12
Valem Tutorials
Рет қаралды 33 М.
Ozoda - Lada (Official Music Video)
06:07
Ozoda
Рет қаралды 9 МЛН