3D Static Object In-game Framework

1. Load Folder containing the asset into the Package Loader Project

Developer may import .obj files, .fbx file, or 3d software package file that is supported by Unity.

1.a Extract the Materials from the prefab (if necessary)

If you select the 3D Object file, (in this case, a .OBJ file), some materials may need to be remapped.

In this case, in the inspector, open the 'materials' tab and click the "Extract Materials..." to extract the materials. It should automatically remap the materials. Although, manual remapping may be necessary.

2. Drag the 3D Asset into the Scene, set orientation and position

Make sure the asset is facing the +Z axis and is initially positioned at (0,0,0).

3. Select Static 3D Object Verifier Prefab and drag onto the scene

Go to: the Assets\Rawrshak\Tools\Static3dObjectVerfier\Prefabs

Select the default asset shape you want for this asset.

In this tutorial, we'll use HorizontalZ prefab.

The prefabs will vary in scale and shape.

Please note the Object Bounds script in the inspector.

4. Resize and Orient 3d asset to fit inside the prefab

4.1 Add Box Collider to the model with the Mesh Renderer

Click the object with the mesh renderer to open the inspector. In this case, it's the 'default' object inside SCI_FRS_13_HD game object.

Scroll to the bottom of the inspector on the right and click "Add Component". Type "Box Collider" and select the box collider. It should be added to this object as shown in the image above.

The box collider is the green outline shown above.

The "Collider" should, as much as possible, be tight to the asset. Feel free to use other colliders or adjust the collider if it seems too big. The model may also have issues if the collider looks is extremely incorrect.

4.2 Orient and Resize to fit inside the Prefab

Make sure both HorizontalZObjectBounds and SCI_FRS_13_HD objects are enabled.

Select the HorizontalZObjectBounds to open it's inspector. Set the "Target Object" to the object with the box collider. In this case, the 'default' object inside SCI_FRS_13_HD.

Click Load Target Object button.

Make sure that the 'default' asset has a collider component.

4.3 Verify Asset

Make sure that the HorizontalZObjectBounds is at (0,0.5,0) with a scale of (1,1,2).

If the asset intersects or is completely outside the object bounds, it will turn red.

Make sure that the asset is oriented correctly and is scaled to completely fit inside the bounding box. The Objects bounds must become clear before you continue.

5. Finished!

When it's done and you're satisfied with how the asset looks in-game, it is ready for packaging!

Last updated