Archive for 6月, 2014

 

blender : animation clipを複数作成

6月 20th, 2014

・Dope Sheet ・Action Editor ・Attackのような名前を付けて unityへの取り込みはblendファイルのまま。 legacyを選択するだけ、animationタブ内に複数のアニメーションクリップが出現します。

Read full article | コメントは受け付けていません。

unity gameobjectを見分ける。 GetInstanceID

6月 20th, 2014

prefabなどで同じ物を複数作ったときに同じ物か別の物かを判別するときにGetInstanceID()で比較出来ました。 別の物にぶつかったか、同じ物に2回ぶつかったかを判定。 「打つかる(ぶつかる)」って感じ初めて見た気がする。

Read full article | コメントは受け付けていません。

unity : OnControllerColliderHit, OnCollisionEnter , OnTriggerEnter

6月 19th, 2014

CharacterControllerを使うと OnControllerColliderHit が使えるようで。 enterではなく接触常時反応しているStay系に近い感じです。 CharacterController同士は、取得出来ないそうです。 OnCollisionEnterとの併用もあまり上手くないそうです。 作り方によるとは思いますが、自分の場合は以下の組み合わせた理想に近い反応をえることが出来ました。 物体には、OnControllerColliderHit キャラクター(敵)には OnTriggerEnterを使ってみます。

Read full article | コメントは受け付けていません。

blender : outlinerで複数選択する方法。

6月 16th, 2014

unityのmecanimのためにモデルをrigで作るときにWGTがたくさん出来るので削除する。 outliner( 右のリスト)で a で全選択になる。 で個別にクリックすると一つずつ選択解除される。 で選べたら右クリックで削除。(worldなど削除出来ないアイテムが選択されていると削除出来ない。 === unity , blender rigify , mecanim http://blog.bbtune.com/archives/2970/unity-blender-rigify-mecanim

Read full article | コメントは受け付けていません。

unity shadow pro only ? one directional light , hard shadows

6月 11th, 2014

http://docs.unity3d.com/Manual/class-MeshRenderer.html directional lightのhard shadowsは freeでも使えるようですが http://docs.unity3d.com/Manual/DirectionalShadowDetails.html Note: on mobile platforms realtime shadows for directional lights always use 1 shadow cascade and are Hard Shadows. モバイルでは、という記載はありますが。 これは4.2からfreeで使えるようです。

Read full article | コメントは受け付けていません。

unity editor stage setting

6月 10th, 2014

ステージのブロックは位置用に unity editorを作りました。 ・プレファブを配置して、オブジェクト名とポジション、ローテーションをテキストに保存。 ・テキストを読込んでプレファブをロード メモ オブジェクト名は(Clone)を削除して保存。 http://docs.unity3d.com/ScriptReference/Resources.Load.html resuources.loadから生成。 http://docs.unity3d.com/ScriptReference/EditorUtility.SaveFilePanel.html savefile textのloadはTextAssetで TextAsset txtdata= Resources.Load(“stage/”+level) as TextAsset; string[] data = txtdata.text.Split (‘\n’);

Read full article | コメントは受け付けていません。

unity editor | other button

6月 10th, 2014

http://docs.unity3d.com/412/Documentation/ScriptReference/ScriptableWizard.OnWizardOtherButton.html ボタンは2つまででした。 1つは OnWizardCreate 2つめは OnWizardOtherButton 名前はなんでも

Read full article | コメントは受け付けていません。

unity remote 4

6月 5th, 2014

http://docs.unity3d.com/Manual/UnityRemote4.html asset storeでunity remote 4を入れる。 4.5以上でないと駄目だった。。ので4.5をまずいれる。 iosかandroid用のunity remote 4を入れる。 usb接続する。 edit > settings > editor > remoteをチェック 今回は any android deviceか any iosを選択 一度 unityを再起動。 Unity Remote 4を起動すると映像が表示されました! タッチがそのまま出来るのでやや便利かもしれませんが、とりあえず程度ですね

Read full article | コメントは受け付けていません。