C#
特定のオブジェクトをON/OFFする
まずはスクリプトのみですが using UnityEngine; using System.Collections; public class detachchild : MonoBehaviour { p […]
NavmeshAgent上の速度検出
Rigidbody.veocity.magnitude で速度は出ません using UnityEngine; using System.Collections; public class enemyScr […]
UnityからArduinoにシリアルで送信
文字列として数字を送ります Unity側(要SerialHandler) using UnityEngine; using System.Collections; using System;//use for time […]
特定のオブジェクトの角度を出す
X軸の場合 using UnityEngine; using System.Collections; public class getAngle : MonoBehaviour { // Use this for ini […]
miniJSONのkey値がないときの処理
miniJSONのとき,指定したKey があるかどうか,無くてもnullは返ってこない. のでjsondictionary.ContainsKey(keyname)でBoolで結果がでる jsonDict. […]
PrefabのToggleをGetする
いそいでいるのでスクリプトのみ using UnityEngine; using System.Collections; using UnityEngine.UI; public class prefabinfoSend […]
Jsonデータを作成する
Jsonデータをむりくり作成 using UnityEngine; using System.Collections; public class jsontest : MonoBehaviour { // Use thi […]
Unityで作成した子オブジェクトを削除
子化したPrefabを削除します ボタン用のスクリプトで使用しています public void resutPanelClose(){//パネルクローズ時に作成したprefabを削除する resultPanelObj.Se […]
UnityでListを使う(NCMB関連)
NCMB(Nifty Cloud Mobile Backend)のデータ検索の際のサンプルスクリプトの //QueryTestを検索するクラスを作成 NCMBQuery<NCMBObject> query = […]