Snapchat Kit for Unity
  • Introduction
  • Installation Troubleshooting
  • Settings
    • Snapchat Kit Settings
  • Usage
    • Namespace
  • API
    • Is Service Available
    • Initialisation
    • Login & Logout
    • Get Snap Profile Data
    • Share Content
    • Add Extra Content(Stickers & Links)
  • Utility Snippets
    • Download Texture from Url
Powered by GitBook
On this page
  1. API

Initialisation

First call to use SnapchatKit features

Initialise Snapchat Kit plugin by calling Initialise method. This initialises the plugin and returns a callback which has the success status.

SnapchatKitManager.Initialise(callback);

Examples

SnapchatKitManager.Initialise((bool success, string error) =>
{
    string message  =  success ? "Successfully Initialised" : "Failed Initialising
SnapchatKit : " +error;
    Debug.Log(message);
});
using VoxelBusters.SnapchatKit;

private void Initialise()
{
    SnapchatKitManager.Initialise(OnInitialiseComplete);
    
    // Another way to pass callback
    /*
    SnapchatKitManager.Initialise((bool success, string error) =>
    {
        string message  =  success ? "Successfully Initialised" : "Failed Initialising
SnapchatKit : " +error;
        Debug.Log(message);
    });*/
}

private void OnInitialiseComplete(bool success, string error)
{
    string message  =  success ? "Successfully Initialised" : "Failed Initialising
SnapchatKit : " +error;
    Debug.Log(message);
}
PreviousIs Service AvailableNextLogin & Logout

Last updated 6 years ago