question

ismediagames avatar image
ismediagames asked

Referal sample scene not working

The sample scene from GitHub for referral recipe is missing scripts.

My project has a working playfab SDK installed and I am already using it for authentication and login.

But when I tried adding the referral recipe package, all the scripts were missing inside the sample scene except for the ReferralCodeDemo.cs.

Anyway, what I am actually looking for is how to set up a referral system. So maybe this script is enough to understand what is actually needed.



sdks
2 comments
10 |1200

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

Seth Du avatar image Seth Du ♦ commented ·

Can you provide more details? I have cloned the Referal sample from https://github.com/PlayFab/PlayFab-Samples and it works fine. The only error reported is because JSONWrapper is no longer used in the latest SDK. Replace it with PlayFabSimpleJSON will fix it. Otherwise, I don't see any issues.

0 Likes 0 ·
ismediagames avatar image ismediagames Seth Du ♦ commented ·

Hmm strange, I guess I am missing a step then. Cause it shows missing scripts after I install the package while I already have the playfab SDK installed in the project.

I didn't clone the repo, I just downloaded the sample and installed it locally is that the issue?


image

0 Likes 0 ·

1 Answer

·
Seth Du avatar image
Seth Du answered

The GameObejct Updates in my project is different from you and I believe there are something missing in your project.

My implementation step is [create a Unity project] -> [implement PlayFab Extension] -> [login and install SDK] -> [import ReferralCodesRecipe.unitypackage].

I will suggest you clone the repo or try to reimport the project to see if this issue can be solved.


2 comments
10 |1200

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

ismediagames avatar image ismediagames commented ·

It's fine it doesn't matter. I figured the scripts out from the cloud script and the demo referral script.

But I don't see where do you check if the referral is already inside the player data. It seems like you can have 10 of the same referrals in referrals data.

0 Likes 0 ·
ismediagames avatar image ismediagames commented ·

Oh got it, if a player has a badge already he won't be added.

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.