SDK initialization
Learn how this package downloads and initializes the Facebook Instant Games SDK.
Facebook Instant Games platform
If you use the Facebook Instant Games platform when building your project, this package automatically downloads and initializes the Facebook Instant Games SDK when the build runs in the Facebook environment.
Other platforms
For other platforms, you’ll need to download and initialize the Facebook Instant Games SDK manually.
To do so, add <script src="https://connect.facebook.net/en_US/fbinstant.7.1.js"></script>
to the index.html
file and call FBInstant.InitializeAsync
, followed by FBInstant.StartGameAsync
in your Unity code, awaiting the completion of each call before proceeding:
await FBInstant.InitializeAsync();
await FBInstant.StartGameAsync();