Prop Component: Difference between revisions

From Pummel Party Mod Documentation
Jump to navigation Jump to search
mNo edit summary
mNo edit summary
 
(6 intermediate revisions by one other user not shown)
Line 1: Line 1:
The prop component is a fundamental [[Rendering Components|renderer component]] for creating visible scene objects in mods. The environment of a mod is created by placing many props into the scene.
The prop component is a fundamental [[:Category:Rendering Components|rendering component]] for creating visible scene objects in mods. The environment of a mod is created by placing many props into the scene.
The prop component is built for convenience. Its functionality can be replicated using a combination of a [[Mesh Renderer Component|mesh renderer]] and a [[Collider Components|collider component]].
The prop component is built for convenience. Its functionality can be replicated using a combination of a [[Mesh Renderer Component|mesh renderer]] and a [[:Category:Physics Components|collider]].


== Creating a Prop Component ==
== Creating a Prop Component ==
=== From the Hierarchy ===
=== From the Hierarchy ===
In the hierarchy, right click and choose ''3D Object > Prop''.
In the hierarchy, right-click and choose ''3D Object > Prop''.
This can also be accessed from the to the top of the mod editor toolbar under ''GameObject''.
This can also be accessed from the top of the mod editor toolbar under ''GameObject''.
This will add a new gameobject containing a Prop component as a child of the selected gameobject.  
This will add a new gameobject containing a Prop component as a child of the selected gameobject.  


''3D Object > Cube/Sphere/Plane'' also create props, but automatically sets their '''Prop''' field to a cube, sphere or plane prop asset respectively.
''3D Object > Cube/Sphere/Plane'' also creates props, but automatically sets their '''Prop''' field to a cube, sphere or plane prop asset respectively.


=== From the Inspector ===
=== From the Inspector ===
The Prop component can be added to an existing gameobject through the inspector. The gameobject should be selected from the hierarchy or scene view.
The Prop component can be added to an existing gameobject through the inspector. The gameobject should be selected from the hierarchy or scene view.
* Add a Prop Component by clicking the '''Add Component''' button at the top of the inspector and choosing ''Rendering > Prop''.
* Add a Prop Component by clicking the '''Add Component''' button at the top of the inspector and choosing ''Rendering > Prop''.


Only one Prop Component can be added to a GameObject.
Only one Prop Component can be added to a GameObject.


== Component Settings ==
== Component Settings ==
Line 25: Line 23:
| '''Prop''' || The visible prop asset to display.
| '''Prop''' || The visible prop asset to display.
|-
|-
| '''Tint Color''' || The prop's colors will be tinted with this color. White will show the prop's original colors.
| '''Tint Color''' || The prop's colors will be tinted with this color. White will show the prop's original colors.  
''Note: This field may not work on some of the provided prop assets. It also does nothing if custom materials are used.''
|-
|-
| '''Collision Type''' || Define how this object collides with other objects.
| '''Collision Type''' || Define how this object collides with other objects.
Line 47: Line 46:
| style="padding-left: 2em;" | ''Shadows Only'' || This prop will only cast shadows. The prop itself will not be visible, only its shadow.
| style="padding-left: 2em;" | ''Shadows Only'' || This prop will only cast shadows. The prop itself will not be visible, only its shadow.
|-
|-
| '''Custom Materials''' ||A list of any custom materials. These will override the default material used by the prop asset.
| '''Custom Materials''' || A list of any custom materials. These will override the default material used by the prop asset.
|}
|}
== Example Usage ==
[[File:PropSceneExample.png|thumb|600px|right|Everything in this simple scene is made of props.]]
Props are the primary building blocks of minigame and board mod environments. Some of the provided props are meant to be used together and will perfectly connect or align when placed beside each other. Using [[Mod Editor Shortcuts|grid snapping]] (Hold CTRL while moving in the scene view) or exact values in the gameobject's [[Transform Component]] can help with the alignment of props. Most props don't fit together nicely and are best placed roughly, slightly overlapping, to create a solid floor/wall.
[[Category:Rendering Components]]
[[Category:Components]]

Latest revision as of 01:07, 16 December 2022

The prop component is a fundamental rendering component for creating visible scene objects in mods. The environment of a mod is created by placing many props into the scene. The prop component is built for convenience. Its functionality can be replicated using a combination of a mesh renderer and a collider.

Creating a Prop Component

From the Hierarchy

In the hierarchy, right-click and choose 3D Object > Prop. This can also be accessed from the top of the mod editor toolbar under GameObject. This will add a new gameobject containing a Prop component as a child of the selected gameobject.

3D Object > Cube/Sphere/Plane also creates props, but automatically sets their Prop field to a cube, sphere or plane prop asset respectively.

From the Inspector

The Prop component can be added to an existing gameobject through the inspector. The gameobject should be selected from the hierarchy or scene view.

  • Add a Prop Component by clicking the Add Component button at the top of the inspector and choosing Rendering > Prop.

Only one Prop Component can be added to a GameObject.

Component Settings

Property Description
Prop The visible prop asset to display.
Tint Color The prop's colors will be tinted with this color. White will show the prop's original colors.

Note: This field may not work on some of the provided prop assets. It also does nothing if custom materials are used.

Collision Type Define how this object collides with other objects.
None Disables all collision.
Box Uses a box collider that tightly fits the visible prop asset.
Sphere Uses a sphere collider that tightly fits the visible prop asset.
Mesh Uses a mesh collider. The collision will exactly match the visible mesh of the prop asset. Use this for advanced shapes that need exact collisions.
Shadow Should shadows be cast from this prop.
Off This prop will not cast any shadows.
On This prop will cast shadows.
Two Sided This prop will cast shadows. It will cast shadows from both sides of each polygon that makes up the visible model.
Shadows Only This prop will only cast shadows. The prop itself will not be visible, only its shadow.
Custom Materials A list of any custom materials. These will override the default material used by the prop asset.

Example Usage

Everything in this simple scene is made of props.

Props are the primary building blocks of minigame and board mod environments. Some of the provided props are meant to be used together and will perfectly connect or align when placed beside each other. Using grid snapping (Hold CTRL while moving in the scene view) or exact values in the gameobject's Transform Component can help with the alignment of props. Most props don't fit together nicely and are best placed roughly, slightly overlapping, to create a solid floor/wall.