Microsoft Azure PlayFab logo
    • Multiplayer
    • LiveOps
    • Data & Analytics
    • Add-ons
    • For Any Role

      • Engineer
      • Designer
      • Executive
      • Marketer
    • For Any Stage

      • Build
      • Improve
      • Grow
    • For Any Size

      • Solo
      • Indie
      • AAA
  • Runs on PlayFab
  • Pricing
    • Blog
    • Forums
    • Contact us
  • Sign up
  • Sign in
  • Ask a question
  • Spaces
    • PlayStream
    • Feature Requests
    • Add-on Marketplace
    • Bugs
    • API and SDK Questions
    • General Discussion
    • LiveOps
    • Topics
    • Questions
    • Articles
    • Ideas
    • Users
    • Badges
  • Home /
  • General Discussion /
avatar image
Question by agniesportsyt · Nov 18, 2020 at 02:58 PM · CloudScriptFriendsShared Group Data

Can We call Cloud Scripts in Unity - void Update() for receiving a friend request ?

I found from Brendan that there is no friend request option available in PlayFab and we can never expect in the future as PlayFab don't work on - Friends, in game chat etc. But now I wanted to know can we use execute cloud scripts in the update function of PlayFab or no. As per my knowledge we cannot as there are limits to the cloud scripts calls. If so how/which part of the code can I notify the receiver of the friend request using cloud scripts and SharedGroupData which was showcased in the slideshare - advanced cloud scripts.

Comment
agniesportsyt

People who like this

1 Show 0
10 |1200 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

2 Replies

· Add your reply
  • Sort: 
avatar image
Best Answer

Answer by Brendan · Nov 19, 2020 at 01:00 AM

To be clear, I would never say you should "never expect" a feature change (though I may well say "for the foreseeable future"). We are continually taking feedback from developers and reviewing the requests we get through this forum and more direct discussions. So if there's a feature you want, it's a good idea to make sure you've let us know.

The built-in friends system in PlayFab works more similarly to a "follower" system, since it doesn't natively do two-way linking and there's no confirmation stage (accept or decline a friend request). If what you want is to build a system like that, you would want to either use polling from the client to check if there are outstanding friend requests, or else use a PubSub type model (an example is here: https://github.com/PlayFab/PlayFab-Samples/tree/master/Samples/CSharp/MessagingClient) to notify the client when there are updates it needs to check.

In addition to there being call rate limits on calls to Cloud Script, please bear in mind that each call to Cloud Script is going to "tick" the relevant meters for your title, which could wind up adding significantly to your costs.

As a side note, we would strongly recommend moving to our Azure Functions Cloud Script integration, as there are many advantages to the newer script service (debugging, more language support, being able to eliminate cold start issues with Azure Premium, etc.).

Comment
agniesportsyt

People who like this

1 Show 0 · Share
10 |1200 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image

Answer by agniesportsyt · Nov 19, 2020 at 03:34 AM

Ok thank you for your reply.

Comment

People who like this

0 Show 0 · Share
10 |1200 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Navigation

Spaces
  • General Discussion
  • API and SDK Questions
  • Feature Requests
  • PlayStream
  • Bugs
  • Add-on Marketplace
  • LiveOps
  • Follow this Question

    Answers Answers and Comments

    2 People are following this question.

    avatar image avatar image

    Related Questions

    SharedGroupData Notification on Desktop 1 Answer

    How to access the variables in the cloud script ? 1 Answer

    How to access the variables of cloud scripts in Unity's C# script ? 0 Answers

    ExecuteCloudScript Errors - 'ExecuteCloudScriptResult' does not contain a definition 0 Answers

    Cloud Script Return Value Problem - Null Reference Error 1 Answer

    PlayFab

    • Multiplayer
    • LiveOps
    • Data & Analytics
    • Runs on PlayFab
    • Pricing

    Solutions

    • For Any Role

      • Engineer
      • Designer
      • Executive
      • Marketer
    • For Any Stage

      • Build
      • Improve
      • Grow
    • For Any Size

      • Solo
      • Indie
      • AAA

    Engineers

    • Documentation
    • Quickstarts
    • API Reference
    • SDKs
    • Usage Limits

    Resources

    • Forums
    • Contact us
    • Blog
    • Service Health
    • Terms of Service
    • Attribution

    Follow us

    • Facebook
    • Twitter
    • LinkedIn
    • YouTube
    • Sitemap
    • Contact Microsoft
    • Privacy & cookies
    • Terms of use
    • Trademarks
    • Safety & eco
    • About our ads
    • © Microsoft 2020
    • Anonymous
    • Sign in
    • Create
    • Ask a question
    • Create an article
    • Post an idea
    • Spaces
    • PlayStream
    • Feature Requests
    • Add-on Marketplace
    • Bugs
    • API and SDK Questions
    • General Discussion
    • LiveOps
    • Explore
    • Topics
    • Questions
    • Articles
    • Ideas
    • Users
    • Badges