This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
IEnumerator VerifySignature(ExternalAuthenticationCredentials credentials) | |
{ | |
WWWForm form = new WWWForm(); | |
form.AddField("publicKeyUrl", credentials.iOSCredentials.PublicKeyURL); | |
form.AddField("timestamp", System.Convert.ToString(credentials.iOSCredentials.Timestamp)); | |
form.AddField("signature", System.Convert.ToBase64String(credentials.iOSCredentials.Signature)); | |
form.AddField("salt", System.Convert.ToBase64String(credentials.iOSCredentials.Salt)); | |
form.AddField("playerId", NPBinding.GameServices.LocalUser.Identifier); | |
form.AddField("bundleId", NPBinding.Utility.GetBundleIdentifier()); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using System.Collections; | |
using VoxelBusters.NativePlugins; | |
public class ExampleClass : MonoBehaviour | |
{ | |
public void Start() | |
{ | |
if (MailComposer.CanSendMail()) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using VoxelBusters.InstagramKit; | |
public void IsAvailable() | |
{ | |
bool isAvailable = InstagramKitManager.IsAvailable(); | |
string message = isAvailable ? "Instagram Kit is available!" : "Instagram Kit is not available. Instagram app may not be installed."; | |
Debug.Log(message); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Namespace for using utility functions | |
using VoxelBusters.InstagramKit.Common.Utility; | |
// Path can be from local or web | |
private void DownloadFileToPersistentPath(string filePath, string targetFileName) | |
{ | |
// Downloading if the file doesn't exist | |
if (!FileOperations.Exists (Application.persistentDataPath + "/" + targetFileName)) | |
{ | |
// Download file from given path |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Required Namesapce for using Utitlity Functions | |
using VoxelBusters.InstagramKit.Common.Utility; | |
// You need pass a texture2D which is marked as Readable in its inspector and pass saveName with extension. Ex: photo.png or photo.jpg | |
void SaveImage(Texture2D image, string saveName) | |
{ | |
byte[] data = null; | |
if (saveName.EndsWith("png")) | |
{ | |
data = ImageConversion.EncodeToPNG(image); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using System.Collections; | |
namespace VoxelBusters.NativePlugins | |
{ | |
/// <summary> | |
/// This provides unique access to a product which is purchasable. This encloses details for accessing different properties of a in-app product. | |
/// </summary> | |
[System.Serializable] | |
public class BillingProduct |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using System.Collections; | |
//Ideally can use Layers but want to avoid as, max layers avaialble isn't a big number. | |
public class SelectiveRendering : MonoBehaviour | |
{ | |
//Working version - Can expect as transform values are required for rendering. But not sure if this is optimal way. | |
[SerializeField] | |
private GameObject[] m_targetObjects; |