3D Static Object In-game Framework
Last updated
Last updated
Developer may import .obj files, .fbx file, or 3d software package file that is supported by Unity.
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.
Make sure the asset is facing the +Z axis and is initially positioned at (0,0,0).
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.
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.
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.
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.
When it's done and you're satisfied with how the asset looks in-game, it is ready for packaging!