Unity エディターでは、モデリングソフトウェアで作成できるあらゆる形状の 3D モデルを扱うことができます。エディターでは、例えば、以下のようなオブジェクトタイプを作成することができます。
プリミティブをシーンに追加するには、GameObject > 3D Object を選択し、必要なプリミティブを選択します。これでデフォルトのプリミティブがローカル座標空間に追加され、Inspector ウィンドウの Transform でオブジェクトのサイズと位置を変更することができます。
これらのオブジェクトは、特定のアイテムをモデル化するのに便利です。また、テスト用のプレースホルダーやプロトタイプを作成するのに使うこともできます。このページでは、各プリミティブオブジェクトの一般的な使用方法を詳しく説明しますが、プロジェクトに最も適した方法でオブジェクトを使用することができます。
デフォルトの Cube (キューブ) プリミティブは、1×1 単位の 6 面を持つ白い立方体です。キューブにはテクスチャが貼られており、各面で画像が繰り返されます。キューブは、壁、柱、箱、階段、その他同様のオブジェクトを構築するため、あるいは開発中の便利なプレースホルダーとしてよく使用されます。例えば、キューブの辺の長さは 1 単位なので、シーンにインポートしたメッシュの近くにキューブを追加して大きさを比較すれば、その比率を確認することができます。
デフォルトの Sphere (スフィア) プリミティブは、直径が 1 単位 (つまり半径 0.5 単位) です。スフィア/球のテクスチャは、標準的な球面 UV マッピング で作成されます。そのため、画像はスフィアを包み、上下の両極でしぼられています。スフィアは、ボール、惑星、弾丸などを表現するのに便利です。半透明のスフィアを使って、エフェクトの半径を表現する GUI デバイスとして利用することもできます。
デフォルトの Cylinder (円柱) プリミティブは、高さ 2 単位、直径 1 単位です。円柱のテクスチャは、本体のチューブ形状に一度だけ包み、平らな両端では別々に繰り返されます。円柱は、柱や棒、車輪を作りたいときに便利です。コライダーのデフォルトの形状はカプセルです (Unity にはプリミティブの円柱コライダーはありません)。正確な円柱状の物理コライダーを得るには、モデリングプログラムで円柱形のメッシュを作成し、メッシュコライダーをアタッチします。
Capsule (カプセル) のプリミティブは、半球の形のキャップで上下を閉じた円柱です。デフォルトのカプセルは直径が 1 単位の長さで高さが 2 単位の高さです (本体は 1 単位、各キャップは 0.5 単位) です。テクスチャは、画像が一回りし、各半球の頂点で端をつまむように描かれています。カプセルは、丸みを帯びたオブジェクトの物理挙動が、箱のそれよりも特定のタスクに適しているため、プロトタイプのプレースホルダーとして有用です。
デフォルトの Quad (クアッド) プリミティブは、1 単位の長さの辺を持つ正方形で、2 つの三角形に分割され、ローカル座標空間の XY 面に向いています。クアッドは、画像やムービーの表示画面として使うことができます。また、クアッドを利用して、簡単な GUI や情報表示、パーティクル、スプライト、偽造画像などを実装し、遠方にある固体オブジェクトの表示の代用とすることができます。
The default plane primitive is a flat square with edges ten units long, divided into 200 triangles, and is oriented in the xz plane of the local coordinate space. The square is textured so that the complete image appears once within the square.
Planes are useful for most flat surfaces, such as floors and walls. You can use a plane to show special effects and images or movies in GUI, but it might be easier to use a quad primitive.
A plane’s texture only renders from above. If you are below the plane, the plane’s texture is transparent.
Did you find this page useful? Please give it a rating:
Thanks for rating this page!
What kind of problem would you like to report?
Thanks for letting us know! This page has been marked for review based on your feedback.
If you have time, you can provide more information to help us fix the problem faster.
Provide more information
You've told us this page needs code samples. If you'd like to help us further, you could provide a code sample, or tell us about what kind of code sample you'd like to see:
You've told us there are code samples on this page which don't work. If you know how to fix it, or have something better we could use instead, please let us know:
You've told us there is information missing from this page. Please tell us more about what's missing:
You've told us there is incorrect information on this page. If you know what we should change to make it correct, please tell us:
You've told us this page has unclear or confusing information. Please tell us more about what you found unclear or confusing, or let us know how we could make it clearer:
You've told us there is a spelling or grammar error on this page. Please tell us what's wrong:
You've told us this page has a problem. Please tell us more about what's wrong:
Thank you for helping to make the Unity documentation better!
Your feedback has been submitted as a ticket for our documentation team to review.
We are not able to reply to every ticket submitted.