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
/* LINEとはてブのシェアボタンを消す */ | |
.sns-design-type01 .sns-top li, .sns-design-type01 .sns li, .sns-design-type02 .sns-top li, .sns-design-type02 .sns li { | |
width: 32.8% !important; | |
} | |
.sns-design-type01 .sns-top li:nth-of-type(5), .sns-design-type01 .sns li:nth-of-type(5), .sns-design-type02 .sns-top li:nth-of-type(5), .sns-design-type02 .sns li:nth-of-type(5) { | |
margin-right: 0 !important; | |
display: none; | |
} | |
.sns-design-type01 .sns-top li:nth-of-type(3), .sns-design-type01 .sns li:nth-of-type(3), .sns-design-type02 .sns-top li:nth-of-type(3), .sns-design-type02 .sns li:nth-of-type(3) { | |
margin-right: 0; |
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 UnityEngine.iOS; | |
public class DetectIOSOnMac : MonoBehaviour | |
{ | |
private void Awake() | |
{ | |
if (Device.iosAppOnMac) | |
{ | |
// iOSアプリがMac上で動作している |
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
#if UNITY_DISABLE_AUTOMATIC_SYSTEM_BOOTSTRAP | |
#define UNITY_DISABLE_AUTOMATIC_SYSTEM_BOOTSTRAP_RUNTIME_WORLD | |
#endif | |
using Unity.Scenes; | |
using UnityEngine; | |
namespace Unity.Entities | |
{ | |
#if !UNITY_DISABLE_AUTOMATIC_SYSTEM_BOOTSTRAP_RUNTIME_WORLD |
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 enum ShaderPropToggle | |
{ | |
Off = 0, | |
On = 1 | |
} | |
Shader "ShaderPropToggleExample" | |
{ | |
Properties | |
{ |
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
FirebaseUser fbUser = ...; | |
foreach (var provider in fbUser.ProviderData) | |
{ | |
// EmailPW方式なら「password」 | |
// Twitterなら「twitter.com」が入る(TwitterAuthProvider.ProviderIdの値) | |
Debug.Log(provider.ProviderId); | |
Debug.Log(provider.DisplayName); | |
Debug.Log(provider.PhotoUrl); | |
} |
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 UnityEditor.Callbacks; | |
using UnityEditor.iOS.Xcode; | |
public static class DisableBitCodeBuildProcessor | |
{ | |
[PostProcessBuild] | |
private static void OnPostProcessBuild(BuildTarget buildTarget, string 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
var credential = TwitterAuthProvider.GetCredential(oauth_token, oauth_token_secret); | |
var auth = FirebaseAuth.GetAuth(FirebaseApp.DefaultInstance); | |
// FirebaseUserではなくSignInResultを取得できる | |
SignInResult result = await auth.CurrentUser.LinkAndRetrieveDataWithCredentialAsync(credential); | |
// その中のAdditionalUserInfoに... | |
AdditionalUserInfo info = result.Info; | |
// Profileという名前でユーザ情報のマップが格納されている |
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
var credential = TwitterAuthProvider.GetCredential(oauth_token, oauth_token_secret); | |
var auth = FirebaseAuth.GetAuth(FirebaseApp.DefaultInstance); | |
FirebaseUser firebaseUser = await auth.CurrentUser.LinkWithCredentialAsync(credential); | |
// 既存ユーザにSNS連携しても自動で更新してくれるわけではない | |
Debug.Log(firebaseUser.DisplayName); | |
Debug.Log(firebaseUser.PhotoUrl); |
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
// よしなに取得 | |
var oauth_token = "..."; | |
var oauth_token_secret = "..."; | |
var credential = TwitterAuthProvider.GetCredential(oauth_token, oauth_token_secret); | |
var auth = FirebaseAuth.GetAuth(FirebaseApp.DefaultInstance); | |
FirebaseUser firebaseUser = await auth.SignInWithCredentialAsync(credential); | |
// SNSのプロフィール名 |
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 UnityEditor; | |
/// <summary> | |
/// SetDirtyするツール | |
/// </summary> | |
public static class SetDirtyTool | |
{ | |
[MenuItem("Assets/SetDirty", false)] | |
public static void SetDirty() | |
{ |