Skip to content

Instantly share code, notes, and snippets.

View matsuyoro's full-sized avatar

matsu matsuyoro

  • japan
View GitHub Profile
@matsuyoro
matsuyoro / TimeScaleEditor.cs
Last active April 2, 2019 06:50
Unityアプリ開発のデバッグに使える時間操作(TimeScale)のショートカット
using UnityEditor;
using UnityEngine;
// timescaleをデバッグ用に操作
public class TimeScaleEditor
{
// 現在の2倍速に ショートカットキー「Cmd + ↑」
[MenuItem("Tools/TimeScale/SpeedUpx2 %UP")]
static void SpeedUpx2()
@matsuyoro
matsuyoro / file0.txt
Created October 6, 2017 03:16
Unity2017にAdmobメディエーションでAppLovinSDKをいれたら、UnityEditor上でエラーがでる ref: http://qiita.com/matsuyoro/items/2f5a07cf23980dda0c4c
Exception: JNI: Init'd AndroidJavaClass with null ptr!
UnityEngine.AndroidJavaClass..ctor (System.IntPtr jclass) (at /Users/builduser/buildslave/unity/build/Runtime/Export/AndroidJavaImpl.cs:622)
UnityEngine.AndroidJavaObject.get_JavaLangClass () (at /Users/builduser/buildslave/unity/build/Runtime/Export/AndroidJavaImpl.cs:600)
UnityEngine.AndroidJavaObject.FindClass (System.String name) (at /Users/builduser/buildslave/unity/build/Runtime/Export/AndroidJavaImpl.cs:591)
UnityEngine.AndroidJavaClass._AndroidJavaClass (System.String className) (at /Users/builduser/buildslave/unity/build/Runtime/Export/AndroidJavaImpl.cs:611)
UnityEngine.AndroidJavaClass..ctor (System.String className) (at /Users/builduser/buildslave/unity/build/artifacts/generated/common/runtime/AndroidJavaBindings.gen.cs:92)
AppLovin.getDefaultPlugin () (at Assets/Plugins/AppLovin/AppLovin.cs:106)
AppLovin.SetSdkKey (System.String sdkKey) (at Assets/Plugins/AppLovin/AppLovin.cs:560)
GameSceneSingleton.RequestRewardBasedVideo () (at Assets/Scri
@matsuyoro
matsuyoro / exp.cs
Last active August 3, 2017 10:20
Unity5 NGUIで、NGUITools.AddChildしたものの実体を参照する ref: http://qiita.com/matsuyoro/items/b021c716e89cb8ec4f8a
GameObject prefab = (GameObject)Resources.Load("Prefabs/UI/Balloons/BtnBalloon") as GameObject;
GameObject BalloonPrefab = NGUITools.AddChild(BalloonParentObj, prefab);// NGUIに追加 帰り値で、prefabの実体を参照
Destroy(BalloonPrefab,4f); //4秒後に追加したprefabを削除
@matsuyoro
matsuyoro / GameManager.cs
Last active April 4, 2017 03:49
iOS/Android(Unity5.5)で Admobメディエーションで、バナー広告、インタースティシャル広告、動画リワード広告を、最適化した色んな会社の広告をシングルトンで一元化して出す方法 ref: http://qiita.com/matsuyoro/items/33d723fdef798f74d286
// 〜〜省略
GameSceneSingleton.Instance.setVideoSdkCallbackListener(this);
// 〜〜省略
@matsuyoro
matsuyoro / FragmentActivity.java
Last active September 28, 2016 16:22
fragmentのタブのアイコン画像のサイズをカスタマイズする ref: http://qiita.com/matsuyoro/items/48399411cca6764e051b
TabLayout tabLayout = (TabLayout) findViewById(R.id.tabs);
tabLayout.setupWithViewPager(mViewPager);
tabLayout.getTabAt(0).setCustomView(R.layout.design_fragment_icon_camera);
tabLayout.getTabAt(1).setCustomView(R.layout.design_fragment_line_weight);
@matsuyoro
matsuyoro / file0.txt
Created August 22, 2016 05:21
storyboardで「Must translate autoresizing mask into constraints to have _setHostsLayoutEngine:YES.」というエラーがでた場合 ref: http://qiita.com/matsuyoro/items/9219c23a70c012d6e3e5
Must translate autoresizing mask into constraints to have _setHostsLayoutEngine:YES.
@matsuyoro
matsuyoro / Podfile
Last active August 19, 2016 00:34
AdMobメディエーションでFAN(facebook audience network)を出す方法 ref: http://qiita.com/matsuyoro/items/6f402247d2e53df48e68
pod 'FBAudienceNetwork'
@matsuyoro
matsuyoro / file0.cs
Created March 16, 2016 00:27
Unity Ads と Ad Colonyの動画SDKをUnity(C#)で一元管理したメモ(SDKだらけ〜〜w ref: http://qiita.com/matsuyoro/items/0959ba21a001d2dd7eca
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
// unity ads
using UnityEngine.Advertisements;
public class GameSceneSingleton {
@matsuyoro
matsuyoro / file0.txt
Last active November 13, 2015 04:05
iOSアプリ等でwebviewを表示する際に、拡大はするがユーザーがピンチで拡大や、スクロールができないようにする。 ref: http://qiita.com/matsuyoro/items/2240b29e14d23bda102f
_webView.scalesPageToFit = YES;
@matsuyoro
matsuyoro / file0.txt
Last active April 11, 2016 23:58
Unity rigidbody2Dでよく使うメソッド一覧 ref: http://qiita.com/matsuyoro/items/e32b4fd12d20e5c06614
transform.localEulerAngles.z;