Make sure your GameObject has a Collider Component attached to it.
确保你的游戏对象有一个碰撞器组件连接到它。
They might collide with a GameObject that only contains a Collider.
可以和只包含碰撞器的游戏对象碰撞。
GetComponents Returns all components of type type in the GameObject.
在游戏物体返回全部Type类型组件。
There are some other specialized scenarios for using this GameObject.
这类游戏对象还有许多其他的独特使用情景。
Once sound files are imported, they can be attached to any GameObject.
一旦声音文件被导入,它们可以被附加到任何游戏对象上。
In Unity, you add components to a GameObject to give it functionality.
在Unity中我们可以通过给一个物体组件来给他添加功能。
Static Collider is a GameObject that has a Collider but not a Rigidbody.
一个静态碰撞器是一个包含碰撞器但不含刚体的游戏对象。
You can attach any number or combination of Components to a single GameObject.
你可以将任意数量或组合的组件添加到一个单一的游戏对象。
The original GameObject in the Hierarchy have now become an instance of the Prefab.
继承树中的原始的游戏对象已经变成了预置的一个实例。
When you drag a mesh to the scene, you are creating a GameObject that has a mesh Renderer Component.
当你将其拖动到场景中时,你就已经创建了一个具有网格渲染器组件的游戏对象。
You can adjust the Transform of any GameObject from the Scene View, the Inspector, or through Scripting.
可以从场景视图、检视面板、或通过脚本调整任意gameobject的变换。
Remember that you can always use the Inspector to see which Components are attached to the selected GameObject.
记住,你始终可以使用检视视图,看看哪些组件连接到了选定的游戏对象。
If you are working with a texture or a sound file, you will have to add it to a GameObject that already exists in the Scene or Project.
如果你要使用一个纹理或声音文件,你必须将它添加到一个已存在于场景或项目中的游戏对象上。
It is worth pointing out that the Transform values in the Inspector of any Child GameObject are displayed relative to the Parent's Transform values.
需要特别指出的是,在检视面板任何子游戏物体显示的变换的值相对于父变换的值。
The Transform Component just happens to be critical to all GameObjects, so each GameObject has one. But GameObjects can contain other Components as well.
变换组件仅仅是所有游戏对象的决定性组件,所以每个游戏对象有一个,游戏对象可以包含其他组件。
Look at the image below. It is an empty GameObject with an Audio Source Component. All the values of the Audio Source in the Inspector are the default values.
如下图所示,是一个具有音频源组件的空对象,检视视图中音频源的所有值是默认值。
You can create a Parent by dragging any GameObject in the Hierarchy View onto another. This will create a Parent-Child relationship between the two GameObjects.
同在层级视图拖拽任意游戏物体到另一个上面就可以创建父物体,这会在两个游戏物体直接创建父子关系。
For example, if you have an airplane, you would model two versions. One where the plane consists of a single GameObject with Mesh Renderer and scripts for airplane physics.
例如,如果有架飞机,要准备两个版本的模型,其中一个飞机包含单个游戏物体带有网格渲染器和飞机物理学的脚本。
Once sound files are imported, they can be attached to any GameObject. The Audio file will create an Audio Source Component automatically when you drag it onto a GameObject.
一旦声音文件被导入,它们可以被附加到任何游戏对象上。当你将它拖到一个游戏对象上时,音频文件将自动创建一个音频源组件。
When the Audio Listener is attached to a GameObject in your scene, any Sources that are close enough to the Listener will be picked up and output to the computer's speakers.
当音频监听器贴在场景中的一个游戏对象,任何音频源,如果足够接近侦听器就会被获取并输出到计算机的扬声器。
When the Audio Listener is attached to a GameObject in your scene, any Sources that are close enough to the Listener will be picked up and output to the computer's speakers.
当音频侦听器被添加到场景里得某个游戏对象上得时候,如果某些音频源距离侦听器足够近,就会被捕捉到,并输出到电脑的扬声器。
A rocket launcher instantiates a rocket Prefab when the user presses fire. The Prefab contains a mesh, Rigidbody, Collider, and a child GameObject that contains a trail particle system.
当用户按下开火时,火箭发射器实例一个火箭预置物体。预置物体包含一个网格、刚体、碰撞器和一个子游戏物体包含的粒子系统拖尾。
Any GameObject in a scene that is tagged with 'EditorOnly' will be not be included in the published build. This is useful for debugging scripts that don't need to be included in the final game.
任何一个标有' EditorOnly '标签的游戏对象将不包含在发布的作品中,这对于调试那些不需要包含在最终游戏里的脚本是非常有用的。
When you attach a Component to a GameObject, there are different values or Properties in the Component that can be adjusted in the editor while building a game, or by scripts when running the game.
当你为游戏对象附加一个组件,该组件有不同的值或属性,它们可以在你建立游戏时在编辑器里进行调整,或者在运行游戏时由脚本来调整。
When you attach a Component to a GameObject, there are different values or Properties in the Component that can be adjusted in the editor while building a game, or by scripts when running the game.
当你为游戏对象附加一个组件,该组件有不同的值或属性,它们可以在你建立游戏时在编辑器里进行调整,或者在运行游戏时由脚本来调整。
应用推荐