<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>*** Project Uni ***</title>
	<atom:link href="http://nantara.jp/blog/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://nantara.jp/blog</link>
	<description>Just another WordPress site</description>
	<lastBuildDate>Thu, 22 May 2014 07:36:02 +0000</lastBuildDate>
	<language>ja</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>画面サイズの固定（アスペクト比の固定）</title>
		<link>http://nantara.jp/blog/?p=168</link>
		<comments>http://nantara.jp/blog/?p=168#comments</comments>
		<pubDate>Thu, 22 May 2014 07:36:02 +0000</pubDate>
		<dc:creator>Nantara</dc:creator>
				<category><![CDATA[Unityメモ]]></category>

		<guid isPermaLink="false">http://nantara.jp/blog/?p=168</guid>
		<description><![CDATA[端末間での画面サイズを簡単に吸収できるコードを見つけたのでメモ。 Awake()内などに下記を記述。 // アスペクト比の固定処理 var camera : Camera = GameObject.Find(&#8220;Main Camera&#8221;).GetComponent(Camera); var baseAspect : float = 960.0f / 640.0f;// 固定させたい値 var nowAspect : float = (parseFloat(Screen.height) / parseFloat(Screen.width)); var changeAspect : float = 0.0; if(baseAspect &#62; nowAspect){ changeAspect = nowAspect &#8230; <a href="http://nantara.jp/blog/?p=168">続きを読む <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>端末間での画面サイズを簡単に吸収できるコードを見つけたのでメモ。<br />
Awake()内などに下記を記述。</p>
<p>// アスペクト比の固定処理<br />
var camera : Camera = GameObject.Find(&#8220;Main Camera&#8221;).GetComponent(Camera);</p>
<p>var baseAspect : float = 960.0f / 640.0f;// 固定させたい値<br />
var nowAspect : float = (parseFloat(Screen.height) / parseFloat(Screen.width));<br />
var changeAspect : float = 0.0;</p>
<p>if(baseAspect &gt; nowAspect){<br />
changeAspect = nowAspect / baseAspect;<br />
camera.rect = Rect((1.0f &#8211; changeAspect) * 0.5f,0.0f,changeAspect,1.0f);<br />
}else{<br />
changeAspect = baseAspect / nowAspect;<br />
camera.rect = Rect(0.0f,(1.0f &#8211; changeAspect) * 0.5f,1.0f,changeAspect);<br />
}</p>
]]></content:encoded>
			<wfw:commentRss>http://nantara.jp/blog/?feed=rss2&#038;p=168</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Unityのアンドロイド用マニフェストの一部上書きや変更。</title>
		<link>http://nantara.jp/blog/?p=160</link>
		<comments>http://nantara.jp/blog/?p=160#comments</comments>
		<pubDate>Wed, 21 May 2014 18:10:09 +0000</pubDate>
		<dc:creator>Nantara</dc:creator>
				<category><![CDATA[Unity（for Android）]]></category>

		<guid isPermaLink="false">http://nantara.jp/blog/?p=160</guid>
		<description><![CDATA[=========================== http://nantara.jp/blog/?p=154 =========================== ※上記に記載されているAndroidのプロジェクト出力方法の設定をすると、 MyUnityProject&#62;Temp&#62;StagingAreaフォルダ にAndroidのプロジェクトが出力されるようになります。この中のマニフェストファイルをコピーします。 コピーしてきたマニフェストファイルに必要な記述をして編集＆保存します。 Assets&#62;Plugins&#62;Androidフォルダ（無ければ作る、名前は左記のとうり）に編集したマニフェストファイルを配置してください。 これで次回ビルド時からこのマニフェストファイルの内容が適用されます。]]></description>
			<content:encoded><![CDATA[<p>===========================<br />
<a href="http://nantara.jp/blog/?p=154">http://nantara.jp/blog/?p=154</a><br />
===========================<br />
※上記に記載されているAndroidのプロジェクト出力方法の設定をすると、<br />
MyUnityProject&gt;Temp&gt;StagingAreaフォルダ<br />
にAndroidのプロジェクトが出力されるようになります。この中のマニフェストファイルをコピーします。</p>
<p>コピーしてきたマニフェストファイルに必要な記述をして編集＆保存します。</p>
<p>Assets&gt;Plugins&gt;Androidフォルダ（無ければ作る、名前は左記のとうり）に編集したマニフェストファイルを配置してください。</p>
<p>これで次回ビルド時からこのマニフェストファイルの内容が適用されます。</p>
]]></content:encoded>
			<wfw:commentRss>http://nantara.jp/blog/?feed=rss2&#038;p=160</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>UnityのAndroidプロジェクトの出力</title>
		<link>http://nantara.jp/blog/?p=154</link>
		<comments>http://nantara.jp/blog/?p=154#comments</comments>
		<pubDate>Wed, 21 May 2014 15:50:00 +0000</pubDate>
		<dc:creator>Nantara</dc:creator>
				<category><![CDATA[Unity（for Android）]]></category>

		<guid isPermaLink="false">http://nantara.jp/blog/?p=154</guid>
		<description><![CDATA[Unity上で、Androidのプロジェクトを出力できるようにする設定。 （１）[Edit]→[Preferences]で設定ウィンドウを表示。 （２）External Toolsのタブをクリック。 （３）Android SDK Location[c:\adt-buldlexxxxxxx/sdk（←こんな感じでADTのsdkフォルダを選択）] （４）Android向けのプラットフォームで、実行ファイル（apk）を作成すると、MyUnityProject&#62;Temp&#62;StagingAreaフォルダが出来ている。これがプロジェクト一式となる。]]></description>
			<content:encoded><![CDATA[<p>Unity上で、Androidのプロジェクトを出力できるようにする設定。</p>
<p>（１）[Edit]→[Preferences]で設定ウィンドウを表示。</p>
<p>（２）External Toolsのタブをクリック。</p>
<p>（３）Android SDK Location[c:\adt-buldlexxxxxxx/sdk（←こんな感じでADTのsdkフォルダを選択）]</p>
<p>（４）Android向けのプラットフォームで、実行ファイル（apk）を作成すると、MyUnityProject&gt;Temp&gt;StagingAreaフォルダが出来ている。これがプロジェクト一式となる。</p>
]]></content:encoded>
			<wfw:commentRss>http://nantara.jp/blog/?feed=rss2&#038;p=154</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MiniJSON.csの使い方</title>
		<link>http://nantara.jp/blog/?p=148</link>
		<comments>http://nantara.jp/blog/?p=148#comments</comments>
		<pubDate>Wed, 21 May 2014 15:25:10 +0000</pubDate>
		<dc:creator>Nantara</dc:creator>
				<category><![CDATA[Unityメモ]]></category>

		<guid isPermaLink="false">http://nantara.jp/blog/?p=148</guid>
		<description><![CDATA[MiniJSON.csファイルを取得してきましょう。 ※以下からコピペかダウンロード(2014年5月はあった！) https://gist.github.com/darktable/1411710 Assetsフォルダ&#62;Pluginsフォルダ(無ければ作る、このファイル名である必要がある。)内にMiniJSON.csファイルを配置する。 利用したいJavaScriptのコードの先頭あたりに、 import System.Collections.Generic;// パースする時などに利用する。 import MiniJSON; とインポートしておく。 var dict = Json.Deserialize(json文字列) as Dictionary.&#60;String,System.Object&#62;; var i : int = dict["キー"];// 数値と分かっているものはこんな具合。 var str : String = dict["キー"] as String;// テキストの場合はこんな具合。 var dict2 = dict["キー"] as Dictionary.&#60;String,System.Object&#62;;// &#8220;キー&#8221;:{xxx}の要素をDictionary化。 &#8230; <a href="http://nantara.jp/blog/?p=148">続きを読む <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>MiniJSON.csファイルを取得してきましょう。<br />
※以下からコピペかダウンロード(2014年5月はあった！)<br />
<a href="https://gist.github.com/darktable/1411710">https://gist.github.com/darktable/1411710</a></p>
<p>Assetsフォルダ&gt;Pluginsフォルダ(無ければ作る、このファイル名である必要がある。)内にMiniJSON.csファイルを配置する。</p>
<p>利用したいJavaScriptのコードの先頭あたりに、<br />
import System.Collections.Generic;// パースする時などに利用する。<br />
import MiniJSON;<br />
とインポートしておく。</p>
<p>var dict = Json.Deserialize(<span style="color: #ff0000;">json文字列</span>) as Dictionary.&lt;String,System.Object&gt;;<br />
var i : int = dict["キー"];// 数値と分かっているものはこんな具合。<br />
var str : String = dict["キー"] as String;// テキストの場合はこんな具合。<br />
var dict2 = dict["キー"] as Dictionary.&lt;String,System.Object&gt;;// &#8220;キー&#8221;:{xxx}の要素をDictionary化。<br />
var c : int = dict["キー"] as List.&lt;System.Object&gt;).Count;// ”キー”:[配列]の場合の数を調べる。<br />
var dict3= (dict["キー"] as List.&lt;System.Object&gt;)[0] as Dictionary.&lt;String,System.Object&gt;;// 配列の要素内の&#8221;キー&#8221;:{xxx}の要素をDictionary化。</p>
]]></content:encoded>
			<wfw:commentRss>http://nantara.jp/blog/?feed=rss2&#038;p=148</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ADT Plugin for Eclipseの更新</title>
		<link>http://nantara.jp/blog/?p=144</link>
		<comments>http://nantara.jp/blog/?p=144#comments</comments>
		<pubDate>Wed, 21 May 2014 15:12:43 +0000</pubDate>
		<dc:creator>Nantara</dc:creator>
				<category><![CDATA[Android（ADT）]]></category>

		<guid isPermaLink="false">http://nantara.jp/blog/?p=144</guid>
		<description><![CDATA[ADT Plugin for Eclipseを更新しないとADTがまったく使えなくなるときがある。 ※Eclipse起動後にエラーメッセージが表示される。 [Window]→[Preferences]をクリックすると表示されるウィンドウ内に （×）This Android SDK requires Android Developer Toolkit version x.x.x or above. Current version is x.x.x.vxxxxxxxxxxxxxxxxxxxxx. Please update ADT to the latest version. などとエラー表示される場合はADT Plugin for Eclipseの更新が必要。 （１）[nstall New Software...]をクリック。 （２）Work with:[　　　　　　　　　　　　　　　　　　]▽の項目を▽をクリックして 「Android Developer Toops &#8230; <a href="http://nantara.jp/blog/?p=144">続きを読む <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>ADT Plugin for Eclipseを更新しないとADTがまったく使えなくなるときがある。<br />
※Eclipse起動後にエラーメッセージが表示される。</p>
<p>[Window]→[Preferences]をクリックすると表示されるウィンドウ内に<br />
<span style="color: #ff0000;">（×）</span>This Android SDK requires Android Developer Toolkit version x.x.x or above. Current version is x.x.x.vxxxxxxxxxxxxxxxxxxxxx. Please update ADT to the latest version.</p>
<p>などとエラー表示される場合はADT Plugin for Eclipseの更新が必要。</p>
<p>（１）[nstall New Software...]をクリック。</p>
<p>（２）Work with:[　　　　　　　　　　　　　　　　　　]▽の項目を▽をクリックして<br />
<span style="color: #888888;">「Android Developer Toops Update Site &#8211; <a href="http://dl-ssl.google.com/android/eclipse/"><span style="color: #888888;">http://dl-ssl.google.com/android/eclipse/</span></a>」</span><br />
をチョイスする。</p>
<p>（３）Developer Toolsにチェックして、[Next]をクリック。Review Licensesにacceptして[Finish]をクリック。</p>
<p>（４）インストール開始、途中確認のダイアログが出るが[ok]をクリック。Eclipseが再起動されます。[Window]→[Preferences]をみて、エラー文が消えていれば完了。</p>
]]></content:encoded>
			<wfw:commentRss>http://nantara.jp/blog/?feed=rss2&#038;p=144</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>rigidbody同士（そうじゃなくてもいいかも）で、当たり判定を無視する。</title>
		<link>http://nantara.jp/blog/?p=140</link>
		<comments>http://nantara.jp/blog/?p=140#comments</comments>
		<pubDate>Mon, 28 Apr 2014 11:29:58 +0000</pubDate>
		<dc:creator>Nantara</dc:creator>
				<category><![CDATA[Unity当たり判定]]></category>

		<guid isPermaLink="false">http://nantara.jp/blog/?p=140</guid>
		<description><![CDATA[あるrigidbodyコンポーネントが付いたゲームオブジェクトA,ゲームオブジェクトBが存在するとした場合、 ゲームオブジェクトAとBの衝突を無視するためのコードは、 Physics.IgnoreCollision(gameObjectA.collider,gameObjectB.collider); や Physics.IgnoreCollision(gameObjectA.rigidbody.collider,gameObjectB.rigidbody.collider);// rigidbodyの場合はこちらで行うと良いかもしれない。 とします。配置済みのオブジェクトに対して設定する場合は、Startメソッドなどに記述、コード上でオブジェクトを生成するなどしている場合は生成後に1回コールしてあげるとよさそう。]]></description>
			<content:encoded><![CDATA[<p>あるrigidbodyコンポーネントが付いたゲームオブジェクトA,ゲームオブジェクトBが存在するとした場合、<br />
ゲームオブジェクトAとBの衝突を無視するためのコードは、</p>
<p>Physics.IgnoreCollision(gameObjectA.collider,gameObjectB.collider);</p>
<p>や</p>
<p>Physics.IgnoreCollision(gameObjectA.rigidbody.collider,gameObjectB.rigidbody.collider);// rigidbodyの場合はこちらで行うと良いかもしれない。</p>
<p>とします。配置済みのオブジェクトに対して設定する場合は、Startメソッドなどに記述、コード上でオブジェクトを生成するなどしている場合は生成後に1回コールしてあげるとよさそう。</p>
]]></content:encoded>
			<wfw:commentRss>http://nantara.jp/blog/?feed=rss2&#038;p=140</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>xcode(4.3.2)でのプロジェクト名とスキーム名の変更方法</title>
		<link>http://nantara.jp/blog/?p=137</link>
		<comments>http://nantara.jp/blog/?p=137#comments</comments>
		<pubDate>Thu, 17 May 2012 16:40:14 +0000</pubDate>
		<dc:creator>Nantara</dc:creator>
				<category><![CDATA[iOS（xcode）]]></category>

		<guid isPermaLink="false">http://nantara.jp/blog/?p=137</guid>
		<description><![CDATA[xcode(4.3.2)でのプロジェクト名とスキーム名の変更方法を記載しておきます。 1.Project Navigatorでトップ階層(プロジェクト名が書いてある)を選択状態にする。 ※Project Navigatorは画面左側にあるエリア 2.File InspectorのProject Nameを任意の名称に変更する。 ※File Inspectorは画面右側にあるエリア (ウィンドウが出てきて変更の確認画面が出る。) 3.左上のRun Stopボタンの横にある、[スキーム名＞IPhone 5.1 Simulator]のスキーム名をクリックしてManage Scheme&#8230;を選択します。 4.現在のスキーム名が表示されている部分をゆっくりクリックして任意の名前に変更してokボタンをクリックします。 &#160;]]></description>
			<content:encoded><![CDATA[<p>xcode(4.3.2)でのプロジェクト名とスキーム名の変更方法を記載しておきます。</p>
<p>1.Project Navigatorでトップ階層(プロジェクト名が書いてある)を選択状態にする。<br />
※Project Navigatorは画面左側にあるエリア</p>
<p>2.File InspectorのProject Nameを任意の名称に変更する。<br />
※File Inspectorは画面右側にあるエリア<br />
(ウィンドウが出てきて変更の確認画面が出る。)</p>
<p>3.左上のRun Stopボタンの横にある、[スキーム名＞IPhone 5.1 Simulator]のスキーム名をクリックしてManage Scheme&#8230;を選択します。</p>
<p>4.現在のスキーム名が表示されている部分をゆっくりクリックして任意の名前に変更してokボタンをクリックします。</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://nantara.jp/blog/?feed=rss2&#038;p=137</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>iPhone実機でのフレームレート</title>
		<link>http://nantara.jp/blog/?p=133</link>
		<comments>http://nantara.jp/blog/?p=133#comments</comments>
		<pubDate>Fri, 04 May 2012 18:26:36 +0000</pubDate>
		<dc:creator>Nantara</dc:creator>
				<category><![CDATA[Unity iPhone設定]]></category>

		<guid isPermaLink="false">http://nantara.jp/blog/?p=133</guid>
		<description><![CDATA[iPhone上（iPhone4）で実機テストをするとAndroidと同じプロパティ上でのデフォルトのフレームレートの速度が出ない。 そのためメイン処理に function Awake(){ Application.targetFrameRate = 60.0f; } などと明示的に記述しておくとその速度で動く。 ※もちろん描画、処理内容によってはパフォーマンスの低下はある。 ※この設定はUnity上でのデバッグ再生では適用されない。 &#160;]]></description>
			<content:encoded><![CDATA[<p>iPhone上（iPhone4）で実機テストをするとAndroidと同じプロパティ上でのデフォルトのフレームレートの速度が出ない。</p>
<p>そのためメイン処理に</p>
<p>function Awake(){<br />
Application.targetFrameRate = 60.0f;<br />
}</p>
<p>などと明示的に記述しておくとその速度で動く。<br />
※もちろん描画、処理内容によってはパフォーマンスの低下はある。<br />
※この設定はUnity上でのデバッグ再生では適用されない。</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://nantara.jp/blog/?feed=rss2&#038;p=133</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>unity終了の手順</title>
		<link>http://nantara.jp/blog/?p=120</link>
		<comments>http://nantara.jp/blog/?p=120#comments</comments>
		<pubDate>Sun, 22 Apr 2012 19:21:33 +0000</pubDate>
		<dc:creator>Nantara</dc:creator>
				<category><![CDATA[Unityメモ]]></category>

		<guid isPermaLink="false">http://nantara.jp/blog/?p=120</guid>
		<description><![CDATA[たとえば「android端末であった場合にリターンキーを押した時に終了させたい」場合は、スクリプトのUpdate内に if(Application.platform == RuntimePlatform.Android){ 　　if(Input.GetKey(KeyCode.Escape)){ 　　　　input = INPUT_RETURN; 　　} } などとしてinputに独自のキーコードを設定する。 メイン処理用のゲームオブジェクトでinputの値を確認して、INPUT_RETURNだった場合には Application.Quit(); return; を記述して終了させる。 &#160;]]></description>
			<content:encoded><![CDATA[<p>たとえば「<span style="color: #ff00ff;">android端末であった場合にリターンキーを押した時に終了させたい</span>」場合は、スクリプトのUpdate内に</p>
<p><span>if(Application.platform == <span>RuntimePlatform</span>.Android){</span><br />
<span>　　if(Input.<span>GetKey</span>(<span>KeyCode</span>.Escape)){</span><br />
<span>　　　　input = INPUT_RETURN;</span><br />
<span>　　}</span><br />
<span>}</span></p>
<p>などとしてinputに独自のキーコードを設定する。</p>
<p>メイン処理用のゲームオブジェクトでinputの値を確認して、INPUT_RETURNだった場合には</p>
<p><span style="color: #00ffff;">Application.Quit();</span><br />
<span style="color: #00ffff;">return;</span></p>
<p>を記述して終了させる。</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://nantara.jp/blog/?feed=rss2&#038;p=120</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>複数同時タッチ</title>
		<link>http://nantara.jp/blog/?p=115</link>
		<comments>http://nantara.jp/blog/?p=115#comments</comments>
		<pubDate>Sat, 21 Apr 2012 17:19:18 +0000</pubDate>
		<dc:creator>Nantara</dc:creator>
				<category><![CDATA[Unity入力]]></category>

		<guid isPermaLink="false">http://nantara.jp/blog/?p=115</guid>
		<description><![CDATA[if(Input.GetTouch(0).phase == TouchPhase.Began){};// タッチ初め if(Input.GetTouch(0).phase == TouchPhase.Ended){};// タッチ終わり if(Input.GetTouch(0).phase == TouchPhase.Moved){};// タッチしている 上記をUpdate内に記述して確認する。 タッチ座標は Input.GetTouch(0).position.x Input.GetTouch(0).position.y で取得できます。 複数取得する場合は、0を1にして複数確認すればok。 ※ただし上記はpc上だと確認できないのでマウス操作でも動くように記述を追加しておいた方が良い。 ※GetMouseButtonDown、GetMouseButtonUpなど &#160; &#160;]]></description>
			<content:encoded><![CDATA[<p><span style="color: #00ffff;">if(Input.GetTouch(0).phase == TouchPhase.Began){};// タッチ初め</span><br />
<span style="color: #00ffff;">if(Input.GetTouch(0).phase == TouchPhase.Ended){};// タッチ終わり</span><br />
<span style="color: #00ffff;">if(Input.GetTouch(0).phase == TouchPhase.Moved){};// タッチしている</span></p>
<p>上記をUpdate内に記述して確認する。</p>
<p>タッチ座標は</p>
<p><span style="color: #00ffff;">Input.GetTouch(0).position.x</span><br />
<span style="color: #00ffff;">Input.GetTouch(0).position.y</span></p>
<p>で取得できます。</p>
<p>複数取得する場合は、0を1にして複数確認すればok。</p>
<p>※ただし上記はpc上だと確認できないのでマウス操作でも動くように記述を追加しておいた方が良い。<br />
※GetMouseButtonDown、GetMouseButtonUpなど</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://nantara.jp/blog/?feed=rss2&#038;p=115</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
