1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

Unityの基本的な操作とプログラム

Last updated at Posted at 2020-04-25

Unityの用語集

  • Scene(シーン)
    オブジェクトとそのパラメータを記録し保持しているもの。
    シーン = 場面

  • Hierarchy(ヒエラルキー)
    現在開いているシーンを編集するウィンドウ。

  • GameObject(ゲームオブジェクト)
    イメージは「ただの箱」
    色々な機能を持たせられる。

  • Inspector(インスペクター)
    選択しているものの情報を見るウィンドウ。

  • Component(コンポーネント)
    オブジェクトに様々な機能を持たせられるもの。

コンポーネントの種類

標準

  • Transform
    位置回転大きさの情報を扱う。

  • Meshfilter
    3Dの情報を読み込む。

  • MeshRenderer
    読み込んだ3D情報を見えるようにする。

  • BoxCollider
    四角い当たり判定を設定する。

  • Material
    3Dオブジェクトの材質を設定する。

  • RigidBody
    ゲームオブジェクトを物理特性によって制御する。
    使い方の詳細: https://www.sejuku.net/blog/51770

Cluster Creator Kit

C#によるプログラム記述例

  • コンソールに文字列を出力する
project.cs
Debug.Log("文字列");
  • オブジェクトのx軸を1動かす (1,0,0)
project.cs
transform.position += Vector3.right;
  • オブジェクトを回転させる
project.cs
transform.Rotate(new Vector3(0,0,30))
  • オブジェクトのポジションを取得
project.cs
transform.position.x
transform.position.y
transform.position.z

オブジェクトにテクスチャを適用する

  1. マテリアルを生成し右クリックでImport New Assetを押し、テクスチャ画像を取り込む。
  2. マテリアルのインスペクターのLocalImageのShaderをLegacy ShadersのDiffuseにする。
  3. そしてテクスチャイメージをマテリアルのインスペクターのNone(Texture)のところにD&Dする。

リファレンス: https://book.mynavi.jp/manatee/detail/id=59718

pngテクスチャの透過処理

Shader → Unlit → Transparent
リファレンス: http://mtimsno.hatenablog.jp/entry/2016/06/08/221539

テクスチャを引き伸ばさずに並べる

マテリアルのインスペクターのTilingのx,y値がテクスチャを並べる数である。
おすすめの設定はオブジェクトのスケール値と同じ値を設定することだ。
リファレンス: https://increment-log.com/unity-texture-stretch/

重力を変更する

Edit > Project Settings > Physics > GravityからY値を変更

動くオブジェクト一緒にプレイヤーを動かす

リファレンス: https://codegenius.org/open/courses/23/sections/90

リンク

cluster: https://cluster.mu/
プラットフォーム

VRoidHub: https://hub.vroid.com/
無料でアバターをダウンロードできる。


1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?