レス書き込み
スレへ戻る
写
レス栞
レス消
【ゲームエンジン】Unityなんでも質問スレpart12
PC,スマホ,PHSは
ULA
べっかんこ
公式(スマホ)
公式(PC)
で書き込んでください。
名前
メール
引用切替:
レスアンカーのみ
>>112 > >>109 > > 1 Assetsフォルダ内にResourcesという名前のフォルダを作ります。 > 2 Resourcesフォルダの中にスプライトエディターで分割した画像を入れます。 > 3 スクリプトからスプライト型の配列としてロードします。 > > public class Player : MonoBehaviour > { > Sprite[] sps; //スプライト画像の配列 > SpriteRenderer spr; //スプライトレンダラーコンポネント取得変数 > > // Start is called before the first frame update > void Start() > { > //スプライトレンダラー取得 > spr = GetComponent<SpriteRenderer>(); > //Resourcesフォルダ内のPlayer画像取得 > sps = Resources.LoadAll<Sprite>("Player"); > } > > // Update is called once per frame > void Update() > { > //キーが押されたら画像変更 > if (Input.GetKeyDown("a")) { spr.sprite = sps[0]; } > if (Input.GetKeyDown("d")) { spr.sprite = sps[1]; } > } > }
ローカルルール
SETTING.TXT
他の携帯ブラウザのレス書き込みフォームはこちら。
書き込み設定
で書き込みサイトの設定ができます。
・
ULA
・
べっかんこ(身代わりの術)
・
べっかんこ(通常)
・
公式(スマホ)
・
公式(PC)[PC,スマホ,PHS可]
書き込み設定(板別)
で板別の名前とメールを設定できます。
メモ帳
(0/65535文字)
上
下
板
覧
索
設
栞
歴
Google検索
Wikipedia
ぬこの手
ぬこTOP
0.009s