<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
<channel>




	<title>Unity</title>
	<link>http://unity.creator.ms/</link>
	<description>Flex4、JAVAによるWebコンテンツ制作・Mobileアプリケーション製作・RIA開発</description>
	<language>ja</language>
	<copyright>Copyright 2012, M3 creator</copyright>
	<lastBuildDate>Tue, 01 Nov 2011 11:33:26 +0900</lastBuildDate>
	<generator>http://www.sixapart.com/movabletype/?v=4.27-ja</generator>
	<docs>http://blogs.law.harvard.edu/tech/rss</docs>
	
	<image>
		<url>http://creator.ms/images/logo.gif</url>
		<title>Unity</title>
		<link>http://unity.creator.ms/</link>
		<width>120</width>
		<height>70</height>
	</image>
	
	
	<item>
		<title>エディターログをみよう</title>
		<description><![CDATA[Android 実機を USB 接続してれば、Android SDK/tools/ddms.bat でログをみることができるが、Unity エディタ上での実行ログは、エディターログをみることで、メモリの使用量や処理の流れを確認できる。


<h4>Editor Log</h4>

Windows XP
C:\Documents and Settings\YOUR_USERNAME\Local Settings\Application Data\Unity\Editor.

Windows Vista, 7
C:\Users\YOUR_USERNAME\AppData\Local\Unity\Editor

OS X
/Users/Duck/Library/Logs/Unity/


<h4>WebPlayer Log</h4>

Windows XP
C:\Documents and Settings\YOUR_USERNAME\Local Settings\Temp\UnityWebPlayer\log

Windows Vista, 7
C:\Users\YOUR_USERNAME\Local Settings\Temp\UnityWebPlayer\log

OS X
/Users/Duck/Library/Logs/Unity/]]></description>
		<link>http://unity.creator.ms/unity-012.html</link>
		<guid>http://unity.creator.ms/unity-012.html</guid>
		<category></category>
		<pubDate>Tue, 01 Nov 2011 11:33:26 +0900</pubDate>
		<date>2011.11.01</date>
	</item>
	
	<item>
		<title>ローカルにデータを保存する PlayerPrefs</title>
		<description><![CDATA[ローカルにデータを保存する。as3 でいうところの SharedObject。


<h4>保存方法</h4>

PlayerPrefs.SetFloat("Speed", 12.3);
PlayerPrefs.SetInt("Score", 10);
PlayerPrefs.SetString("Name", "Matsu");

PlayerPrefs.GetFloat("Speed");
PlayerPrefs.GetInt("Score");
PlayerPrefs.GetString("Name");


<h4>保存場所</h4>

スタンドアローン
Macの場合　~/Library/Preferences 
Windowsの場合 レジストリキー HKCUSoftware[company name][product name] 

Webプレーヤー
Macの場合　~/Library/Preferences/Unity/WebPlayerPrefs 
Windowsの場合　%APPDATA%UnityWebPlayerPrefs


<h4>便利スクリプト</h4>

ArrayPrefs
<a href="http://www.unifycommunity.com/wiki/index.php?title=ArrayPrefs" target="_blank"><strong>ArrayPrefs - Unify Community Wiki</strong>
http://www.unifycommunity.com/wiki/index.php?title=ArrayPrefs</a>

ArrayPrefs2
<a href="http://www.unifycommunity.com/wiki/index.php?title=ArrayPrefs2" target="_blank"><strong>ArrayPrefs2 - Unify Community Wiki</strong>
http://www.unifycommunity.com/wiki/index.php?title=ArrayPrefs2</a>]]></description>
		<link>http://unity.creator.ms/unity-011.html</link>
		<guid>http://unity.creator.ms/unity-011.html</guid>
		<category></category>
		<pubDate>Tue, 01 Nov 2011 11:07:18 +0900</pubDate>
		<date>2011.11.01</date>
	</item>
	
	<item>
		<title>SimpleMove で簡単カーレースゲーム</title>
		<description><![CDATA[<h4>CharacterController.SimpleMove</h4>

カーレースゲームに使える SimpleMove サンプル

<pre name="code" class="js">
var speed : float = 3.0;
var rotateSpeed :float = 3.0;
function Update () {
	var controller : CharacterController = GetComponent(CharacterController);
	// Y軸回転
	transform.Rotate(0, Input.GetAxis("Horizontal") * rotateSpeed, 0);
	// 前後移動
	var forward : Vector3 = transform.TransformDirection(Vector3.forward);
	var curSpeed : float = speed * Input.GetAxis("Vertical");
	controller.SimpleMove(forward * curSpeed);
}
@script RequireComponent(CharacterController)
</pre>


<h4>デモ</h4>

【<a href="http://unity.creator.ms/demo/20110803/WebPlayer.html" target="_blank">Demo</a>】

ブラウザでも確認できるように Unity の Web プレイヤーで書きだしています。
<a href="http://unity3d.com/webplayer/" target="_blank"><strong>Unity Web Player ダウンロード</strong>
http://unity3d.com/webplayer/</a>


<a href="http://unity3d.com/support/documentation/ScriptReference/CharacterController.SimpleMove.html" target="_blank"><strong>Unity Script Reference ? CharacterController.SimpleMove</strong>
http://unity3d.com/support/documentation/ScriptReference/CharacterController.SimpleMove.html</a>
]]></description>
		<link>http://unity.creator.ms/unity-010.html</link>
		<guid>http://unity.creator.ms/unity-010.html</guid>
		<category></category>
		<pubDate>Wed, 03 Aug 2011 23:46:41 +0900</pubDate>
		<date>2011.08.03</date>
	</item>
	
	<item>
		<title>Terrain エディタで地形をつくる</title>
		<description><![CDATA[Unity 3.4 から Android / iOS でも Terrain エディタが利用可能になった。
Terrain エディタは、地形をつくるエディタ。


<h4>地形をつくる</h4>

1. Terrain をつくる。
[Terrain]_[Create Terrain]

<img src="http://creator.ms/unity/img/unity-20110730-01.jpg" />


2. Terrain のサイズや高さを変更する。
[Terrain]_[Set Resolution]
Set Heightmap resolution パネルがでるので、パラメータを適当に設定します。

[Terrain]_[Flatten Heightmap]
Height 50 に設定。

3. [Inspector]_[Terrain]
Set the terrian height.

<img src="http://creator.ms/unity/img/unity-20110730-02.jpg" />

4. Terrain をドラッグするとボコボコとできあがっていきます。

<img src="http://creator.ms/unity/img/unity-20110730-03.jpg" />

5. 山をつくる。
Brushes
ブラシの形状
Settings
Brush Size, Opacity, Height を変更することで色んな山をつくることができます。

<img src="http://creator.ms/unity/img/unity-20110730-04.jpg" />

5. 谷をつくる。
Settings
Height 50 以下にする（Flatten Heightmap よりも下に設定する）

<img src="http://creator.ms/unity/img/unity-20110730-05.jpg" />

6. Texture を設定する。
[Inspector]_[Terrain]
Paint the terrain texture.
Textures
Edit Textures
Add Texture
Splat に Texture を設定。

Terrian に Texture が設定されます。

7. ライトを追加します。
[GameObject]_[Create Other]_[Directional Light]

<img src="http://creator.ms/unity/img/unity-20110730-06.jpg" />

Terrian で地形ができました。このようにブラシで塗る感覚で、地形を作成できます。


<h4>プレーヤーを追加</h4>

地形を自由に動き回るプレーヤーを追加します。

1. インポート
[Assets]_[Import Pakage]_[Character Controller]

2. First Person Controller を Hierarchy に追加。
好きな場所にプレーヤーを設置します。
Unity 3.4 から [V] キーで、バーテックススナッピング操作が可能になりました。

<img src="http://creator.ms/unity/img/unity-20110730-07.jpg" />


<h4>デモ</h4>

【<a href="http://unity.creator.ms/demo/20110730/WebPlayer.html" target="_blank">Demo</a>】
[↑][↓][←][→]キーで移動、[Space]キーでジャンプです。

ブラウザでも確認できるように Unity の Web プレイヤーで書きだしています。
<a href="http://unity3d.com/webplayer/" target="_blank"><strong>Unity Web Player ダウンロード</strong>
http://unity3d.com/webplayer/</a>]]></description>
		<link>http://unity.creator.ms/unity-009.html</link>
		<guid>http://unity.creator.ms/unity-009.html</guid>
		<category></category>
		<pubDate>Sat, 30 Jul 2011 13:38:04 +0900</pubDate>
		<date>2011.07.30</date>
	</item>
	
	<item>
		<title>Tweet テスト</title>
		<description><![CDATA[Unity で、ツイートするサンプルがあったのでためしてみました。

<a href="http://u3d.as/content/young-wook-yang/let-s-tweet-in-unity/1Dq" target="_blank"><strong>Let's Tweet In Unity by YoungWook Yang -- Unity Asset Store</strong>
http://u3d.as/content/young-wook-yang/let-s-tweet-in-unity/1Dq</a>

簡単に Twitter アカウントの "access token & secret" を取得＆保存することができ、OAuth 認証を必要とする全ての Twitter 機能を扱うことが可能になります。


<h4>手順</h4>

1. Create an application
Twitter にアプリ登録
http://dev.twitter.com/apps/new
Twitter アカウントでログイン

2. Application details を入力
Name:M3UnityTest0
Description:Unity Game Test
WebSite:http://creator.ms
Callback URL:

3. Developer Rules of the Road
Yes, I agree 同意するチェックを入れる。

4. CAPTCHA を入力。

5. [Create your Twitter application]ボタンをクリック。

6. My applications
"Consumer key", "Consumer secret" のそれぞれが表記されます。

7. Settings
Application type
Access:Read, Write and Access direct messages
に変更します。

8. Unity サンプルの Demo シーン ( demo.unity ) を開く。

9. Hierarchy の Demo という GameObject を選択します。

10. Inspector の CONSUMER_KEY, CONSUMER_SECRET に取得した "Consumer key", "Consumer secret" を入力します。

11. Demo シーンを実行。

12. [You need to register your game or application first.]ボタンをクリック。

13. ブラウザが立ち上がって、twitter がアカウント許可を求めてきます。

14. [連携アプリを認証]ボタンをクリック。

15. PIN コードが表示されます。

16. [Please enter your PIN here.]テキストエリアに取得した PIN コードを入力し、[Enter PIN]ボタン

17. [Please enter your tweet here.]テキストエリアにつぶやく内容をエントリーして、[Post Tweet]ボタン

18. Tweet 完了


サンプルソースでは、GetHeaderWithAccessToken() で Twitter API の url を実行していました。

<pre name="code" class="js">
GetHeaderWithAccessToken(
&#9;string httpRequestType, 
&#9;string apiURL, 
&#9;string consumerKey, 
&#9;string consumerSecret, 
&#9;AccessTokenResponse response, 
&#9;Dictionary&lt;string, string&gt; parameters)
</pre>


<h4>Android テスト</h4>

Android にアプリをビルドして、テストしてみたところ、無事ツイートできました。
ただし、現時点で Unity の GUI.TextField は、モバイルだとダイナミックテキストは使えないので、日本語は使用できません。


<h4>iPhone テスト</h4>

12. [You need to register your game or application first.]ボタンをクリック。
13. ブラウザが立ち上がりませんでした。

どうやら、iPhone には対応してないみたいです。]]></description>
		<link>http://unity.creator.ms/unity-008.html</link>
		<guid>http://unity.creator.ms/unity-008.html</guid>
		<category></category>
		<pubDate>Fri, 29 Jul 2011 23:28:39 +0900</pubDate>
		<date>2011.07.29</date>
	</item>
	
	<item>
		<title>Script 新規作成時のテンプレートを変更する</title>
		<description><![CDATA[スクリプトの新規作成時のテンプレートを変更する方法。


<h4>Windows</h4>

C:\Program Files (x86)\Unity\Editor\Data\Resources\ScriptTemplates


<h4>Mac</h4>

/Application/unity/unity.app
[右クリック]_[パッケージの内容を表示]


<h4>テンプレート ファイル</h4>

NewBehaviourScript.cs

<pre name="code" class="js">
using UnityEngine;
using System.Collections;
public class #SCRIPTNAME# : MonoBehaviour
{
	private bool startedFlag = false;
	void Awake()
	{
	}
	void Start()
	{
		Init();
		startedFlag = true;
	}
	void OnEnable()
	{
		if (!startedFlag) return;
		Init();
	}
	void OnDisable()
	{
		if (!startedFlag) return;
		Format();
	}
	void OnDestroy()
	{
	}
	void Update()
	{
	}
	public void Init()
	{
	}
	public void Format()
	{
	}
}
</pre>]]></description>
		<link>http://unity.creator.ms/unity-007.html</link>
		<guid>http://unity.creator.ms/unity-007.html</guid>
		<category></category>
		<pubDate>Mon, 25 Jul 2011 14:44:21 +0900</pubDate>
		<date>2011.07.25</date>
	</item>
	
	<item>
		<title>yield とコールチンと無名関数</title>
		<description><![CDATA[<h4>yield</h4>

yield は、そこで中断し、指定の時間を経過したら、yield 直後のステップから再開されます。

<pre name="code" class="js">
function Start () {
	Debug.Log(Time.time);	// 0
	yield;	// 一時中断。1フレーム後再開
	Debug.Log(Time.time);	// 0.02
	yield WaitForSeconds(2.0f);	// 一時中断。2秒後に再開
	Debug.Log(Time.time);	// 2.031089
}
</pre>

コールチンが使用できる場所には制限があるらしく、Awake() で、yield は使えない。

<pre name="code" class="js">
function Start () {
	Debug.Log(Time.time);	// 0
	StartCoroutine("Test", 2.0f);
	Debug.Log(Time.time);	// 0
}
function Test(time : float) : IEnumerator {
	Debug.Log(Time.time);	// 0
	yield WaitForSeconds(time);
	Debug.Log(Time.time);	// 2.005933
}
</pre>


<h4>コールチンと無名関数</h4>

<pre name="code" class="js">
function Start() {
	WaitForSecondsOrTouch(5);
}
function WaitForSecondsOrTouch (seconds : float) : Coroutine {
  return StartCoroutine( function () {
    var time = 0.0;
    // 指定秒待つ、またはマウスダウンされるまで続ける
    while (time < seconds && !Input.GetMouseButtonDown(0)) {
      time += Time.deltaTime;
      Debug.Log(time);
      yield;
    }
    // 条件がそろったら完了処理
    Debug.Log("Finish");
  } () );
}
</pre>

指定時間内に条件をそろえるまで処理を続けるときなどに利用できる。]]></description>
		<link>http://unity.creator.ms/unity-006.html</link>
		<guid>http://unity.creator.ms/unity-006.html</guid>
		<category></category>
		<pubDate>Sun, 24 Jul 2011 22:15:59 +0900</pubDate>
		<date>2011.07.24</date>
	</item>
	
	<item>
		<title>Ragdoll ゾンビを動かす</title>
		<description><![CDATA[Ragdoll という機能をつかって人型 3D モデルに操り人形のような物理設定をつける。

<h4>人型 3D モデルをインポート</h4>

<a href="http://u3d.as/content/mixamo/zombie-character-pack/1sK" target="_blank"><strong>Zombie Character Pack by Mixamo -- Unity Asset Store</strong>
http://u3d.as/content/mixamo/zombie-character-pack/1sK</a>

<img src="http://creator.ms/unity/img/unity-20110724-01.jpg" />

ZombieCharacterPack をインポートしたら、Project の zombie_hires を Hierarchy に追加します。


<h4>Ragdoll</h4>

<img src="http://creator.ms/unity/img/unity-20110724-02.jpg" />

[GameObject]_[Create Other]_[Ragdoll...]

Create Ragdoll パネルが表示されます。

<img src="http://creator.ms/unity/img/unity-20110724-03.jpg" />

Hierarchy の zombie_hires の各 GameObject を指定していきます。

<img src="http://creator.ms/unity/img/unity-20110724-04.jpg" />


<h4>地面とライトを追加</h4>

<img src="http://creator.ms/unity/img/unity-20110724-05.jpg" />

Cube と Point light を追加してそれぞれ適当に Transform を設定します。


<h4>実行</h4>

実行してみます。

<img src="http://creator.ms/unity/img/unity-20110724-06.jpg" />

<img src="http://creator.ms/unity/img/unity-20110724-07.jpg" />

<img src="http://creator.ms/unity/img/unity-20110724-08.jpg" />

Ragdoll の物理が働き、ぐったりします。


<h4>ゾンビをドラッグして動かす</h4>

ZombieController.js

<pre name="code" class="js">
var spring = 100.0;
var damper = 5.0;
var drag = 10.0;
var angularDrag = 5.0;
var distance = 0.1;
var attachToCenterOfMass = false;
private var springJoint : SpringJoint;
function Update () {
	var layerMask = 1 << 8;
	layerMask = ~layerMask
	// マウスダウンしたときだけ処理する。
	if (!Input.GetMouseButtonDown (0))
		return;
	// メインカメラ検知
	var mainCamera = FindCamera();
	// オブジェクト ヒット チェック
	var hit : RaycastHit;
	if (!Physics.Raycast(mainCamera.ScreenPointToRay(Input.mousePosition),  hit, 100, layerMask))
		return;
	if (!hit.rigidbody || hit.rigidbody.isKinematic)
		return;
	if (hit.transform.name == "Mine(Clone)")
		return;
	if (!springJoint) {
		// ドラッグ用オブジェクト追加
		var go : GameObject = new GameObject("RigidbodyDragger") as GameObject;
		var body : Rigidbody = go.AddComponent("Rigidbody") as Rigidbody;
		springJoint = go.AddComponent("SpringJoint") as SpringJoint;
		go.rigidbody.isKinematic = true;
	}
	// ジョイント アンカーのPosition。Position は局所空間で定義されます。
	springJoint.transform.position = hit.point;
	if (attachToCenterOfMass) {
		var anchor = transform.TransformDirection(hit.rigidbody.centerOfMass) + hit.rigidbody.transform.position;
		// ワールド空間から局所空間に
		anchor = springJoint.transform.InverseTransformPoint(anchor);
		springJoint.anchor = anchor;
	} else {
		springJoint.anchor = Vector3.zero;
	}
	springJoint.spring = spring;
	springJoint.damper = damper;
	springJoint.maxDistance = distance;
	springJoint.connectedBody = hit.rigidbody;
	// コールチン
	StartCoroutine ("DragObject", hit.distance);
}
function DragObject (distance : float) {
	var oldDrag = springJoint.connectedBody.drag;
	var oldAngularDrag = springJoint.connectedBody.angularDrag;
	springJoint.connectedBody.drag = drag;
	springJoint.connectedBody.angularDrag = angularDrag;
	var mainCamera = FindCamera();
	while (Input.GetMouseButton (0)) {
		var ray = mainCamera.ScreenPointToRay (Input.mousePosition);
		springJoint.transform.position = ray.GetPoint(distance);
		yield;
	}
	if (springJoint.connectedBody) {
		springJoint.connectedBody.drag = oldDrag;
		springJoint.connectedBody.angularDrag = oldAngularDrag;
		springJoint.connectedBody = null;
	}
}
function FindCamera (){
	if (camera)
		return camera;
	else
		return Camera.main;
}
</pre>

ZombieController コンポーネントをゾンビに追加して実行。

<img src="http://creator.ms/unity/img/unity-20110724-09.jpg" />

ドラッグして、ゾンビを動かすことができます。
頭をつかんでドラッグすると意外とゾンビの動きを自分で演出できて楽しい。


<h4>デモ</h4>

【<a href="http://unity.creator.ms/demo/20110724/WebPlayer.html" target="_blank">Demo</a>】
ゾンビをドラッグできます。

ブラウザでも確認できるように Unity の Web プレイヤーで書きだしています。
<a href="http://unity3d.com/webplayer/" target="_blank"><strong>Unity Web Player ダウンロード</strong>
http://unity3d.com/webplayer/</a>

<a href="http://unity3d.com/support/documentation/Components/wizard-RagdollWizard.html" target="_blank"><strong>Unity - Ragdoll Wizard</strong>
http://unity3d.com/support/documentation/Components/wizard-RagdollWizard.html</a>]]></description>
		<link>http://unity.creator.ms/unity-005.html</link>
		<guid>http://unity.creator.ms/unity-005.html</guid>
		<category></category>
		<pubDate>Sun, 24 Jul 2011 16:42:07 +0900</pubDate>
		<date>2011.07.24</date>
	</item>
	
	<item>
		<title>アングリーバード的なゲームをつくる</title>
		<description><![CDATA[アングリーバード的なゲームをつくる簡単なデモ

【<a href="http://unity.creator.ms/demo/20110707/WebPlayer.html" target="_blank">Demo</a>】
画面をクリックするとボールが発射します。

ブラウザでも確認できるように Unity の Web プレイヤーで書きだしています。
<a href="http://unity3d.com/webplayer/" target="_blank"><strong>Unity Web Player ダウンロード</strong>
http://unity3d.com/webplayer/</a>



<h4>これが今回のサンプルの完成形</h4>

<img src="http://creator.ms/unity/img/unity-20110707-01.jpg" />

グラウンドとボール、ブロックだけのシンプルなものです。

Unity を起動し、[File]_[New Project] でプロジェクトを新規作成をしたら TestScene という名前のシーンを保存します。


<h4>Hierarchy</h4>

<img src="http://creator.ms/unity/img/unity-20110707-02.jpg" />

このような GameObject 構成です。それぞれの作成方法は―

<img src="http://creator.ms/unity/img/unity-20110707-03.jpg" />

Player となるボール Sphere を作成
[GameObject]_[Create Other]_[Sphere]
Sphere に Rigidbody コンポーネントを追加
[Component]_[Physics]_[Rigidbody]
Sphere から Player に名前を変更。
（名前は、適当なもので OK です。）


<img src="http://creator.ms/unity/img/unity-20110707-04.jpg" />

Ground となる Cube を作成
[GameObject]_[Create Other]_[Cube]
Scale を調整して、地面とみたてます。


<img src="http://creator.ms/unity/img/unity-20110707-05.jpg" />

ブロック となる Cube を作成
[GameObject]_[Create Other]_[Cube]
Cube に Rigidbody コンポーネントを追加
[Component]_[Physics]_[Rigidbody]

<img src="http://creator.ms/unity/img/unity-20110707-06.jpg" />

Inspector の Mass で、Cube の質量を調整します。
値が小さくなると軽い Cube となります。
Cube を複製してブロックを積み上げます。
それぞれの Cube の Scale を調整して、縦長、横長のブロックを用意します。


<img src="http://creator.ms/unity/img/unity-20110707-07.jpg" />

明りとなる Point Light を作成
[GameObject]_[Create Other]_[Point Light]
GameObject がよくみえるところに配置してください。


<h4>ボールを発射する</h4>

<img src="http://creator.ms/unity/img/unity-20110707-08.jpg" />

PlayerConntroller となる空の GameObject を作成
[GameObject]_[Create Empty]

<img src="http://creator.ms/unity/img/unity-20110707-09.jpg" />

Project に JavaScript ファイルを作成します。
Project [右クリック]_[Create]_[JavaScript]

PlayerController.js

<pre name="code" class="js">
var player : GameObject;
var shootPowerX : float = 400.0;
var shootPowerY : float = 400.0;
function Update () {
	if ( Input.GetButtonDown("Fire1") ) {
		player.rigidbody.AddForce(shootPowerX, shootPowerY, 0);
	}
}
</pre>

マウスクリックされたら、player に対して、力を加えるという簡単なお仕事です。

PlayerController.js を Hierarchy の PlayerConntroller(空の GameObject) にドラッグ＆ドロップします。
自作のコンポーネントをつくり、GameObject に対して適応させたということになります。
Hierarchy の PlayerConntroller を選択すると Inspector にコンポーネントのパラメータが表示されます。

<img src="http://creator.ms/unity/img/unity-20110707-10.jpg" />

Player のところに Hierarchy の Player をドラッグしましょう。


<h4>リセットボタンをつくる</h4>

空の GameObject を作成
[GameObject]_[Create Empty]
名前を Trigger とします。

Project に JavaScript ファイルを作成します。
Project [右クリック]_[Create]_[JavaScript]
名前を Trigger.js とします。

Trigger.js

<pre name="code" class="js">
function OnGUI () {
	if ( GUI.Button(Rect(10, 10, 50, 50), "Reset") ) {
		Application.LoadLevel("TestScene");
	}
}
</pre>

Reset ボタンをクリックしたら、シーンを再読み込みをするものです。

Trigger.js を Hierarchy の Trigger(空の GameObject) にドラッグ＆ドロップします。


<h4>デモ</h4>

【<a href="http://unity.creator.ms/demo/20110707/WebPlayer.html" target="_blank">Demo</a>】
画面をクリックするとボールが発射します。

ブラウザでも確認できるように Unity の Web プレイヤーで書きだしています。
<a href="http://unity3d.com/webplayer/" target="_blank"><strong>Unity Web Player ダウンロード</strong>
http://unity3d.com/webplayer/</a>


ボールやブロックの数や設定を調整することで面白いゲームがつくれると思います。

重力を変更したい場合は、
[Edit]_[Priject Settings]_[Physics]
Physics Manager で物理設定を管理することができます。

Unity は 3D 描画や物理演算に加えて、パーティクルなどの GUI もそろっています。


<h4>ダウンロード</h4>

【<a onclick="javascript:pageTracker._trackPageview('/download/demo/20110707_AngryBirds');" href="http://download.creator.ms/demo/20110707_AngryBirds.zip">ダウンロード</a>】

Project ファイルをご自由にカスタマイズしてお使いください。
オブジェクト同士が衝突したときに爆発パーティクルを発生させるなどカスタマイズしていくと良いと思います。]]></description>
		<link>http://unity.creator.ms/unity-004.html</link>
		<guid>http://unity.creator.ms/unity-004.html</guid>
		<category></category>
		<pubDate>Thu, 07 Jul 2011 08:39:07 +0900</pubDate>
		<date>2011.07.07</date>
	</item>
	
	<item>
		<title>エラー NullReferenceException</title>
		<description><![CDATA[原因不明のエラーがでた。

NullReferenceException: Object reference not set to an instance of an object
UnityEditor.ObjectSelector.OnDisable () (at C:/BuildAgent/work/6bc5f79e0a4296d6/Editor/Mono/ObjectSelector.cs:138)

どうやらソースにバグがあるのではなく、Unity のレイアウト設定に問題がある様です。


<h4>解決</h4>

[Window]_[Layouts]_[Revert Factory Settings] で解決。

<a href="http://answers.unity3d.com/questions/47276/runtime-error-objectselector.html" target="_blank"><strong>runtime error ObjectSelector - Unity Answers</strong>
http://answers.unity3d.com/questions/47276/runtime-error-objectselector.html</a>]]></description>
		<link>http://unity.creator.ms/unity-003.html</link>
		<guid>http://unity.creator.ms/unity-003.html</guid>
		<category></category>
		<pubDate>Sun, 22 May 2011 19:22:55 +0900</pubDate>
		<date>2011.05.22</date>
	</item>
	
	<item>
		<title>MonoDevelop デバッグ方法</title>
		<description><![CDATA[Unity のエディタを探して、UnityScriptEditor を試したのですが、すでに Unity といっしょにインストールされた MonoDevelop がいいですね。

<a href="http://www.arsoftware.co.uk/products/unityscript-editor" target="_blank"><strong>UnityScript Editor</strong>
http://www.arsoftware.co.uk/products/unityscript-editor</a>

<a href="http://monodevelop.com/" target="_blank"><strong>Main Page - MonoDevelop</strong>
http://monodevelop.com/</a>


<h4>Unity から MonoDevelop を関連付ける</h4>

Windows の場合
Unity [Edit]_[Preferences]_[External Script Editor]
Unity\MonoDevelop\bin\MonoDevelop.exe を選択


Mac の場合
Unity [Unity]_[Preferences]_[External Script Editor]
アプリケーション/Unity/MonoDevelop.app を選択

これで、Unity の Project パネルから js, C# ファイルを MonoDevelop で開くことができます。

<h4>Mac MonoDevelop の GUI 日本語 文字化け対応</h4>

MonoDevelop.app を右クリックで、[パッケージの内容を表示]
/Contents/Frameworks/Mono.framework/Versions/Current/etc/gtk-2.0/gtkrc
font = "Lucida Grande 12"
の下に
font_name ="Hiragino Kaku Gothic Pro 12"
を追加する。

<a href="http://www.sd-tech-blog.com/2011/01/monodevelopunity-for-mac.html" target="_blank"><strong>sd-tech: MonoDevelop(Unity) for Macの日本語文字化けを直す</strong>
http://www.sd-tech-blog.com/2011/01/monodevelopunity-for-mac.html</a>


<h4>Mac MonoDevelop の 日本語 文字化け対応（表示）</h4>

MonoDevelop [Prefarences]_[テキストエディタ]_[一般]_[フォント]_[カスタム]
"Hiragino Kaku Gothic Pro W3, 12" を選択。
ただし、表示だけで、直接 日本語の入力はできません。テキストエディット等をコピペで入力は可能。


<h4>デバッグ</h4>

ブレークポイントを指定してデバッグするには、Unity を MonoDevelop から起動する必要があるみたいです。一度、Unity を閉じて、

MonoDevelop [Run]_[Debug] を実行すると Unity が起動して、デバッグが開始します。


<h4>C# 関数の引数に既定のパラメータを指定したときにデバッグできない警告対応</h4>
デバッグしようとしたら、「既定のパラメータ指定子は使用できません。」という警告が出てデバッグができない現象が起こりました。
どうやら、C# 関数の引数に既定のパラメータを指定したときに起こる様です。

解決方法

[Tools]_[Preferences]
[Options]_[Unity]_[Debugger]
Build project in MonoDevelop のチェックを外す

これで、デバッグ可能になります。]]></description>
		<link>http://unity.creator.ms/unity-002.html</link>
		<guid>http://unity.creator.ms/unity-002.html</guid>
		<category></category>
		<pubDate>Sun, 22 May 2011 18:57:57 +0900</pubDate>
		<date>2011.05.22</date>
	</item>
	
	<item>
		<title>Unity をはじめよう</title>
		<description><![CDATA[<h4>Unity</h4>

<a href="http://unity3d.com/" target="_blank">http://unity3d.com/</a>
<a href="http://unity3d.com/japan/mobile.html" target="_blank">http://unity3d.com/japan/mobile.html</a>


<h4>Unity Download</h4>

<a href="http://unity3d.com/unity/download/" target="_blank">http://unity3d.com/unity/download/</a>


<h4>Tutorial</h4>

2D Gameplay Tutorial
<a href="http://unity3d.com/support/resources/tutorials/2d-gameplay-tutorial.html" target="_blank">http://unity3d.com/support/resources/tutorials/2d-gameplay-tutorial.html</a>

3D Platform Game
<a href="http://unity3d.com/support/resources/tutorials/3d-platform-game.html" target="_blank">http://unity3d.com/support/resources/tutorials/3d-platform-game.html</a>
3D Platform Game 日本語チュートリアル
<a href="http://ws.cis.sojo-u.ac.jp/~izumi/Unity_Documentation_jp/Documentation/3DPlatformTutorial_jp.pdf" target="_blank">http://ws.cis.sojo-u.ac.jp/~izumi/Unity_Documentation_jp/Documentation/3DPlatformTutorial_jp.pdf</a>


<h4>日本語訳ドキュメント</h4>

<a href="http://ws.cis.sojo-u.ac.jp/~izumi/Unity_Documentation_jp/Documentation.html" target="_blank">http://ws.cis.sojo-u.ac.jp/~izumi/Unity_Documentation_jp/Documentation.html</a>


<h4>Sample</h4>

<a href="http://200.35.35.232/UnityCloud/" target="_blank">http://200.35.35.232/UnityCloud/</a>


<h4>Movie</h4>

Unity for Flash Developers - Tutorial 1 - 7
<a href="http://vimeo.com/2827541" target="_blank">http://vimeo.com/2827541</a>

<a href="http://www.willgoldstone.com/learn/index.php?currentPage=unity_lesson1" target="_blank">http://www.willgoldstone.com/learn/index.php?currentPage=unity_lesson1</a>
<a href="http://www.unity3dstudent.com/" target="_blank">http://www.unity3dstudent.com/</a>
<a href="http://www.youtube.com/results?search_query=Unity3d&aq=f" target="_blank">http://www.youtube.com/results?search_query=Unity3d&aq=f</a>

2D in Unity3D with Parallaxing
<a href="http://www.youtube.com/watch?v=HXREh5hacV0" target="_blank">http://www.youtube.com/watch?v=HXREh5hacV0</a>

Unity 3D Side Scroller Assignment
<a href="http://www.youtube.com/watch?v=J0BhBhXH4Wk&NR=1" target="_blank">http://www.youtube.com/watch?v=J0BhBhXH4Wk&NR=1</a>


<h4>Sprite Manager 2</h4>

<a href="http://www.anbsoft.com/middleware/sm2/" target="_blank">http://www.anbsoft.com/middleware/sm2/</a>
<a href="http://www.anbsoft.com/middleware/sm2/image_based_offset/" target="_blank">http://www.anbsoft.com/middleware/sm2/image_based_offset/</a>

Unity で 2D ゲーム制作は、標準で提供されている機能はあまり強力ではないため特にモバイル向けにつくろうとすると Unity オフィシャルの機能だけでは、きびしい。

Unity オフィシャルの機能とは、GUI Texture というもの。
もっとも簡単に 2D を表示できる。

しかしこの GUI Texture の問題点は、ドローコールが多すぎるということ。＞モバイル向けには厳しい。

モバイルコンテンツの目安
・データ量（iPhone4）30000～40000頂点
・ゲームオブジェクト数：70～200 
・ドローコールの回数は、30程度で大きな影響がでる。
モバイル開発は、ドローコールの回数を減らす戦い。

そこで、拡張プラグインの Sprite Manager 2 を使用します。
これは、2D のスプライトをドローコールを最小限に抑えて表示できます。モバイルやるなら必須

・Packed Sprite
基本スプライト。これひとつで大体できます。
これ１つが、１つのスプライトという扱い。
アニメーションなど、ドローコール１回で済む。
他にも Managed Sprite や Super Sprite といったものがある。


<h4>EzGUI</h4>

<a href="http://www.anbsoft.com/middleware/ezgui/" target="_blank">http://www.anbsoft.com/middleware/ezgui/</a>
<a href="http://u3d.as/content/ab-software/ez-gui/1rg" target="_blank">http://u3d.as/content/ab-software/ez-gui/1rg</a>
<a href="http://www.anbsoft.com/middleware/ezgui/EZGUI_Demo_Simple.html" target="_blank">http://www.anbsoft.com/middleware/ezgui/EZGUI_Demo_Simple.html</a>

先に紹介した Sprite Manager 2 と同じくドローコールを最小限にして表現することが可能。

EzGUI は、GUI 作成用
SpriteManager2 は、キャラクタ作成用


<h4>Orthello - 2D framework for Unity3D</h4>

<a href="http://www.wyrmtale.com/products/unity3d-components/orthello" target="_blank">http://www.wyrmtale.com/products/unity3d-components/orthello</a>

Orthello Reference
<a href="http://www.wyrmtale.com/ref/orthello/" target="_blank">http://www.wyrmtale.com/ref/orthello/</a>


<h4>Twitter</h4>

Let's Tweet In Unity
<a href="http://u3d.as/content/young-wook-yang/let-s-tweet-in-unity/1Dq" target="_blank">http://u3d.as/content/young-wook-yang/let-s-tweet-in-unity/1Dq</a>


<h4>Facebook</h4>

Accessing Facebook within Unity
<a href="http://www.ifc0nfig.com/accessing-facebook-within-unity/" target="_blank">http://www.ifc0nfig.com/accessing-facebook-within-unity/</a>


<h4>Scripts</h4>

<a href="http://www.unifycommunity.com/wiki/index.php?title=Scripts" target="_blank">http://www.unifycommunity.com/wiki/index.php?title=Scripts</a>
]]></description>
		<link>http://unity.creator.ms/unity-001.html</link>
		<guid>http://unity.creator.ms/unity-001.html</guid>
		<category></category>
		<pubDate>Sun, 22 May 2011 18:29:42 +0900</pubDate>
		<date>2011.05.22</date>
	</item>
	




</channel>
</rss>
