byerdelen avatar image
byerdelen asked

More login examples for Unity?


I have had a lot of trouble to find examples on Login with custom id and making a working system around it. I had to dig through all your classes because there is no simple login examples around instead angrybots. Now, I am trying to make a Facebook login system that binds users' custom id so that next time they can log in with Facebook to retrieve their data and also get Facebook friends' profile pictures to show in game. Do you have any complete Facebook sample project showing all process that I have missed? Or can you direct me where I can find? If there is not, can you copy paste simple methods for those methods?


1 comment
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Eekolo Qwerku avatar image Eekolo Qwerku commented ·

I completely agree that as a new user finding code to perform what I need with custom ID Logins is a barren wasteland. I've been looking around to no avail and feel very, very lost.

0 Likes 0 ·

1 Answer

brendan avatar image
brendan answered

I would start with these two tutorials, which walk through all the aspects of logging in, linking, and unlinking accounts:

But we also have tutorials on getting started with Facebook, Google, Kongregate, Steam, Twitch, and Windows in our tutorials page, here:

In addition, we provide the complete source for an example project ("Unicorn Battle") that we frequently use for demos, and which includes Facebook login, here:

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

stewart39 avatar image stewart39 commented ·

The documentation is extremely difficult to follow for a beginner. Are there no login scripts provided by playfab that actually plug and play? The video tutorials, even if followed line by line, provide a botany of errors, and I am being persistent to no avail.

The critical factor is that the scripts are not provided in C#. While some may be versatile in multiple languages, and therefore need no C# version implicitly, for a beginner like myself I rely solely on C#, and if a documentation page has no C# version, there is little I can do beyond.

In short I am unable to do any proper login other than login in as a guest, which I still have trouble understanding.

0 Likes 0 ·
brendan avatar image brendan stewart39 commented ·

Actually, all of the "Getting Started" tutorials in that same section of the documentation site have code examples. So, for instance, this one shows how to do a login with Facebook in Unity: Also, the Unicorn Battle game linked above is entirely written in Unity.

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.