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 System.IO; | |
using UnityEditor; | |
using UnityEngine; | |
public static class Texture2DUtils | |
{ | |
[MenuItem("Assets/ConvertToPNG")] | |
public static void ConvertToPNG() | |
{ | |
var tx2d = Selection.activeObject as Texture2D; |
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 System; | |
using System.Collections.Generic; | |
using System.ComponentModel; | |
using System.Data; | |
using System.Drawing; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
using System.Windows.Forms; |
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 System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public class SpectrumController : MonoBehaviour | |
{ | |
public float scale = 100; | |
public float baseHeight = 1; | |
public int visible = 128; | |
public float observe = 2; |
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 NPOI.HSSF.UserModel; | |
using NPOI.SS.UserModel; | |
using NPOI.XSSF.UserModel; | |
using NPOI.SS.Util; | |
using NPOI.SS.UserModel.Charts; | |
Test(); | |
void Test() | |
{ |
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
// Include Facebook namespace | |
using Facebook.Unity; | |
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
using UnityEngine.Networking; | |
using UnityEngine.UI; | |
public class FacebookController : MonoBehaviour | |
{ |
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
public Text resultText; | |
private IEnumerator GetResult(string token) | |
{ | |
var postData = new List<IMultipartFormSection>(); | |
postData.Add(new MultipartFormDataSection("Token", token)); | |
var www = UnityWebRequest.Post("http://192.168.50.150/login.php", postData); | |
yield return www.SendWebRequest(); |
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.UI; | |
using UnityEngine.Networking; |
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
<?php | |
if (isset($_POST['Token'])){ | |
$uri = "https://graph.fb.gg/v11.0/me?fields=id%2Cname&access_token="; | |
$token = $_POST['Token']; | |
$curl = curl_init(); | |
curl_setopt($curl, CURLOPT_URL, $uri . $token); | |
curl_setopt($curl, CURLOPT_HEADER, false); | |
curl_exec($curl); |
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
private void AuthCallback(ILoginResult result) | |
{ | |
if (FB.IsLoggedIn) | |
{ | |
// AccessToken class will have session details | |
var aToken = AccessToken.CurrentAccessToken; | |
// Print current access token's User ID | |
Debug.Log(aToken.UserId); | |
// Print current access token's granted permissions | |
foreach (string perm in aToken.Permissions) |
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
public void OnLoginBtnClick() | |
{ | |
var perms = new List<string>() { "public_profile", "email" }; | |
FB.LogInWithReadPermissions(perms, AuthCallback); | |
} |
NewerOlder