Prop Component: Difference between revisions

From Pummel Party Mod Documentation
Jump to navigation Jump to search
(Added initial content)
 
(Updated table to use wiki table markup instead of html)
Line 19: Line 19:


== Component Settings ==
== Component Settings ==
 
{| class="wikitable"
<table class="wikitable">
|-
 
! Property !! Description
<tr>
|-
<th colspan="2"><strong>Property</strong></th>
| '''Prop''' || The visible prop asset to display.
<th><strong>Function</strong></th>
|-
</tr>
| '''Tint Color''' || The prop's colors will be tinted with this color. White will show the prop's original colors.
 
|-
<tr>
| '''Collision Type''' || Define how this object collides with other objects.
<td style="text-align:left;" colspan="2"><strong>Prop</strong></td>
|-
<td style="text-align:left;">The visible prop asset to display.</td>
| style="padding-left: 2em;" | '''None''' || Disables all collision.
</tr>
|-
<tr>
| style="padding-left: 2em;" | '''Box''' || Uses a box collider that tightly fits the visible prop asset.
<td style="text-align:left;" colspan="2"><strong>Tint Color</strong></td>
|-
<td style="text-align:left;">The prop's colors will be tinted with this color. White will show the prop's original colors.</td>
| style="padding-left: 2em;" | '''Sphere''' || Uses a sphere collider that tightly fits the visible prop asset.
</tr>
|-
<tr>
| style="padding-left: 2em;" | '''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.
<td style="text-align:left;" colspan="2"><strong>Collision Type</strong></td>
|-
<td style="text-align:left;">Define how this object collides with other objects.</td>
| '''Shadow''' || Should shadows be cast from this prop.
</tr>
|-
<tr>
| style="padding-left: 2em;" | '''Off''' || This prop will not cast any shadows.
<td style="text-align:left;"></td>
|-
<td style="text-align:left;"><strong>None</strong></td>
| style="padding-left: 2em;" | '''On''' || This prop will cast shadows.
<td style="text-align:left;">Disables all collision.</td>
|-
</tr>
| style="padding-left: 2em;" | '''Two Sided''' || This prop will cast shadows. It will cast shadows from both sides of each polygon that makes up the visible model.
<tr>
|-
<td style="text-align:left;"></td>
| style="padding-left: 2em;" | '''Shadows Only''' || This prop will only cast shadows. The prop itself will not be visible, only its shadow.
<td style="text-align:left;"><strong>Box</strong></td>
|-
<td style="text-align:left;">Uses a box collider that tightly fits the visible prop asset.</td>
| '''Custom Materials''' ||A list of any custom materials. These will override the default material used by the prop asset.
</tr>
|}
<tr>
<td style="text-align:left;"></td>
<td style="text-align:left;"><strong>Sphere</strong></td>
<td style="text-align:left;">Uses a sphere collider that tightly fits the visible prop asset.</td>
</tr>
<tr>
<td style="text-align:left;"></td>
<td style="text-align:left;"><strong>Mesh</strong></td>
<td style="text-align:left;">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.</td>
</tr>
<tr>
<td style="text-align:left;" colspan="2"><strong>Shadow Casting Mode</strong></td>
<td style="text-align:left;">Define shadows should be cast from this prop.</td>
</tr>
<tr>
<td style="text-align:left;"></td>
<td style="text-align:left;"><strong>Off</strong></td>
<td style="text-align:left;">This prop will not cast any shadows.</td>
</tr>
<tr>
<td style="text-align:left;"></td>
<td style="text-align:left;"><strong>On</strong></td>
<td style="text-align:left;">This prop will cast shadows.</td>
</tr>
<tr>
<td style="text-align:left;"></td>
<td style="text-align:left;"><strong>Two Sided</strong></td>
<td style="text-align:left;">This prop will cast shadows. It will cast shadows from both sides of each polygon that makes up the visible model.</td>
</tr>
<tr>
<td style="text-align:left;"></td>
<td style="text-align:left;"><strong>Shadows Only</strong></td>
<td style="text-align:left;">This prop will only cast shadows. The prop itself will not be visible, only its shadow.</td>
</tr>
<tr>
<td style="text-align:left;" colspan="2"><strong>Custom Materials</strong></td>
<td style="text-align:left;">A list of any custom materials. These will override the default material used by the prop asset.</td>
</tr>
 
</table>

Revision as of 22:41, 24 October 2022

The prop component is a fundamental 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 component.

Creating a Prop Component

From the Hierarchy

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 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.

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.
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.