HarvestableMask
Introduction
HarvestableMask is a C# class that is used in the Unity game engine to specify the area where objects can be harvested from the terrain. It is part of a larger system used to create a realistic and immersive environment for players to interact with. The HarvestableMask class defines the boundary for the harvestable area and is used to determine whether a particular point on the terrain is harvestable or not.
The HarvestableMask class provides a way to set the size and shape of the harvestable area, as well as the level of detail at which the terrain is sampled. It uses a texture mask to specify which areas of the terrain are harvestable, allowing for a high degree of control over the placement and distribution of harvestable objects. The texture mask can be created in any image editing software and is then loaded into the Unity engine for use with the HarvestableMask class.
The HarvestableMask class also allows for the creation of multiple harvestable areas within a single scene, each with its own set of parameters and texture mask. This allows for a great deal of flexibility in designing the game environment and enables the creation of complex and diverse landscapes.
The HarvestableMask class works in conjunction with other classes in the harvesting system, such as the Harvester and HarvestableCollider, to create a fully functional and immersive environment for players to explore and interact with. It is an essential component of any game or simulation that requires harvesting or gathering of resources from a terrain.
Overview
The HarvestableMask
class is a C# script that is used to mask harvestable objects in a game developed with the HNGamers framework when using the Vegetation Studio Pro or Vegetation Studio asset. This script is used to rename the colliders of the mask to match the VegetationItemInstanceID
of the corresponding VegetationItemInstanceInfo
object.
Interface pages:
None.
Constructor pages:
None.
Method pages:
Method Name | Return Type | Description |
---|---|---|
Start() | void | Unity method that is called when the script is first initialized. Sets the game object to inactive. |
renameColliders() | void | Renames the colliders of the mask to match the VegetationItemInstanceID of the corresponding VegetationItemInstanceInfo object. |
Property pages:
None.
Event pages:
None.
Concept/guide pages:
None.
Examples:
None.