【Unity】コピペOKのアスペクト比対応。スマホ向けに背景やUIの大きさを自動で調整する方法。

どうも、だらはです。
今回はスマホ向けでは必須の機能「アスペクト比対応」について紹介したいと思います。
基本的にはコピペでOKな筈なので、是非参考にして頂けたらと思います。
早速ですが ...
【Unity】他のオブジェクトにアタッチされたスクリプトの変数を取得する方法。GetComponent()を使います。

どうも、だらはです。
今回は他のオブジェクトにアタッチされたコンポーネントを取得する方法を紹介します。
早速ですが、変数の取得方法について紹 ...
【Unity】ボタンを実装する方法。Button()やToggle()メソッドを紹介します。

どうも、だらはです。
今回はボタンの実装方法を紹介したいと思います。
具体的には以下のメソッドを紹介します。
RepeatButton()メソッド
Toggle()メソッド ...
【Unity】解像度に合わせてGUIのサイズを調整する。Label()やButton()もコピペで対応可能。

どうも、だらはです。
先日、スクリプトからGUIを表示する方法についてまとめたのですが、ひとつ問題がありました。
それは、スマホなどのように解像度が端末ごとに異なる場合、意図しない実行結果となることでした。
( ...
【Unity】テキストの表示方法まとめ。書式もサイズも変更可能。Label()やGUIStyleStateの使い方。

どうも、だらはです。
今回はUnityEngine.GUIクラスを使ってテキストの表示方法について見ていきたいと思います。
具体的には以下について紹介したいと思います。
【Unity】スマホなどのマルチタッチ入力の検出方法まとめ。Touch構造体を覚えるの巻。

どうも、だらはです。
今回はスマホなどからユーザのタッチ座標を取得する方法をまとめたいと思います。
本稿執筆時点でのUnityでは、マルチタッチの座標をデスクトップで取得することはできませんので実機を準備して試してみて ...
【Unity】テクスチャの表示方法。UnityEngine.GUIクラスのLabel()メソッドを使います。

どうも、だらはです。
今回は、UnityEngine.GUIクラスを使って、テクスチャを表示する方法について見ていきたいと思います。
具体的には、Label()メソッドについて紹介します。
【Unity】キーボード入力の検出方法まとめ。GetKey()メソッドのサンプルスクリプト。

どうも、だらはです。
今回はキーボード入力の検出方法についてまとめたいと思います。
具体的には以下を紹介します。
Input.GetKeyDown()メソッド
I ...
【Unity】マウス入力の検出方法まとめ。mousePositionとGetMouseButtonのサンプルスクリプト。

どうも、だらはです。
今回はマウス入力の検出方法についてまとめたいと思います。
具体的には以下を紹介します。
Input.GetMouseButton()メ ...
【Unity】2Dアクションゲームの作り方【マップ作成】

どうも、だらはです。
前回はアニメーション制御について見てきましたが、今回はマップ作成です。
本稿ではマップを実装して、次回に移動操作可能なプレイヤーを実装していきます。
マップを作る方法は以 ...