Skip to content

Instantly share code, notes, and snippets.

View rainbow23's full-sized avatar
🏠
Working from home

rainbow23 rainbow23

🏠
Working from home
View GitHub Profile
@rainbow23
rainbow23 / AddFrameworkPostProcessBuild
Last active January 20, 2016 06:29
Unity > Xcodeビルド時 pbx, plistを編集できた
using UnityEngine;
using System.Collections;
using System.IO;
using UnityEditor;
using UnityEditor.Callbacks;
using UnityEditor.iOS.Xcode;
public class AddFrameworkPostProcessBuild : MonoBehaviour {
[PostProcessBuild ]
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
public class NumSettings : MonoBehaviour {
private UISprite sprite;
private UISprite childSprite;
private bool hasChild = false;
public bool activeSelf{private set; get;}
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
public class BitmapNumberManager : MonoBehaviour {
private List<NumSettings> numSprites = new List<NumSettings>();
private float firstNumPosX;
private const float initializeOffsetX = 38f;
@rainbow23
rainbow23 / FunctionManagerEditor
Created January 21, 2015 15:20
EditorScript : FunctionManagerのメソッドを一つだけ選ぶ仕組み。
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
using UnityEditor;
[CustomEditor(typeof(FunctionManager))]
[CanEditMultipleObjects]
public class FunctionManagerEditor : Editor {
public override void OnInspectorGUI() {
@rainbow23
rainbow23 / FunctionManager
Created January 21, 2015 15:18
NGUIのUISpriteに貼付ける。FunctionManagerEditor.cs と一緒に使う。
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
[RequireComponent(typeof(UISprite))]
public class FunctionManager : MonoBehaviour {
public enum FuncType{
HelpFunc = 0,
OnOffSound,
ShowOsusumeApps,
ShowRanking,
-(void) registerAdmob
{
NSLog(@"-> registerAdmob initializing Admob start");
UnityViewController* controller = (UnityViewController*)UnityGetGLViewController();
EAGLView* view = (EAGLView*)[controller view];
NSLog(@"EAGLView frame size:(%f, %f)", view.frame.size.width, view.frame.size.height);
CGFloat scaleSize = [UIScreen mainScreen].scale;
NSLog(@"UIScreen scale:%f", scaleSize);
CGFloat screenWidth = view.frame.size.height * scaleSize;
CGFloat bannerWidth = GAD_SIZE_320x50.width;