Unity

Unity5あれこれ

Sceneに配置したTextの中身をスクリプトで変更する(uGUI対応) 1. 空のGameObjectを追加 2. 以下のような内容のスクリプトを作成し、UnityのEditor上で1のGameObjectにアタッチする public Text hogeText; void Start() { debugText.text = "hage"; } 3. Unit…

Unity5が来た!

AssetBundle関連 “The AssetBundle ‘◯◯◯’could not be loaded because it is not compatible with this newer version of the Unity runtime. Rebuild the AssetBundle to fix this error.” やっぱりか…(;´Д`)Unity5のほうでAssetBundleビルドを行った後、…

Unityあれこれ

ローカルのUnityプロジェクトが最新にならない チーム開発等でUnityのプロジェクトを最新にしても、ローカルのAssetが古くて挙動がおかしいことがあった。 以下の手順で解決。 Unityを終了 プロジェクト直下のLibraryディレクトリを丸ごと削除 Unityを起動 C…

コルーチン関連

処理内容 ボタンを表示 ボタンを押すと指定したSceneに遷移 裏で、指定したURLに接続 ソースコード using UnityEngine; using System.Collections; public class Title : MonoBehaviour { void OnGUI () { if (GUI.Button(new Rect(Screen.width/2 -100 , 10…