Skip to content

Instantly share code, notes, and snippets.

@nakamura001
nakamura001 / create_gray_bar.py
Last active February 20, 2020 12:23
グラデーション画像を作成
#! /usr/bin/env python
# coding: utf-8
from PIL import Image
from PIL import ImageDraw
screenW = 640
screenH = 50
img = Image.new('RGBA', (screenW, screenH), (255,255,255,0))
@nakamura001
nakamura001 / Build.cs
Last active August 10, 2017 06:36
UnityのiOSビルド時に特定の.aファイルを削除するサンプル
[PostProcessBuildAttribute(1)]
public static void OnPostProcessBuild (BuildTarget buildTarget, string xcodeProjectDir) {
var projectPath = xcodeProjectDir + "/Unity-iPhone.xcodeproj/project.pbxproj";
Debug.Log ("projectPath: " + projectPath);
PBXProject pbxProject = new PBXProject();
pbxProject.ReadFromFile (projectPath);
// FindFileGuidByRealPath() で指定しているファイル名は実際に削除したいファイルに変更して下さい
string guid = pbxProject.FindFileGuidByRealPath("Libraries/libiPhone-lib.a", PBXSourceTree.Source);
Debug.Log ("guid: " + guid);
if (!string.IsNullOrEmpty(guid))
@nakamura001
nakamura001 / Test.cs
Created June 27, 2017 10:13
HttpWebRequestのサンプル
using UnityEngine;
using UnityEngine.UI;
using System.IO;
using System.Net;
using System.Text;
using System;
using System.Collections;
using System.ComponentModel;
public class Test : MonoBehaviour {
@nakamura001
nakamura001 / Test.cs
Created June 27, 2017 10:12
WebClientのサンプル
using UnityEngine;
using UnityEngine.UI;
using System.IO;
using System.Net;
using System.Text;
using System;
using System.Collections;
using System.ComponentModel;
public class Test : MonoBehaviour {
@nakamura001
nakamura001 / MenuExpansion.cs
Created April 4, 2017 12:21
Unityのエディタ拡張でメニューにチェックを付けるサンプル
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEditor;
public class MenuExpansion : MonoBehaviour {
const string kSampleMenuPath = "Test/Select";
static bool sampleFlag = false; // デフォルトがチェック済みの時には true にする
[MenuItem(kSampleMenuPath)]
@nakamura001
nakamura001 / ガギグゲゴ.txt
Created March 30, 2017 03:04
UnicodeのNFDのサンプル
ガギグゲゴ
パピプペポ
@nakamura001
nakamura001 / ガギグゲゴ.txt
Created March 30, 2017 03:04
UnicodeのNFCのサンプル
ガギグゲゴ
パピプペポ
@nakamura001
nakamura001 / SavWav.cs
Last active March 4, 2020 06:53 — forked from nanmo/SavWav.cs
Unity3D: script to save an AudioClip as a .wav file.
// Copyright (c) 2012 Calvin Rien
// http://the.darktable.com
//
// This software is provided 'as-is', without any express or implied warranty. In
// no event will the authors be held liable for any damages arising from the use
// of this software.
//
// Permission is granted to anyone to use this software for any purpose,
// including commercial applications, and to alter it and redistribute it freely,
// subject to the following restrictions:
@nakamura001
nakamura001 / ScriptableObjectToAsset.cs
Last active December 27, 2015 12:42 — forked from tsubaki/ScriptableObjectToAsset.cs
ScriptableObjectをAssetsファイルとして出力する汎用スクリプト
using UnityEngine;
using System.Collections;
using UnityEditor;
using System.IO;
/// <summary>
// ScriptableObjectをプレハブとして出力する汎用スクリプト
/// </summary>
// <remarks>
// 指定したScriptableObjectをプレハブに変換する。
@nakamura001
nakamura001 / test.md
Last active December 16, 2015 01:04
Markdownのエスケープ方法

Markdownのエスケープ方法

文字 回避方法
# &#35;
* &#42;
- &#45;
= &#61;
[ &#91;
] &#93;
: &#58;