Interface IViewModeConfig
Defines the configuration interface for a view mode, including its name and logic for updating color map textures associated with terrain entities.
Namespace: Fwt.HexTerrains.ViewModes.Data
Assembly: fwt.hexterrains.dll
Syntax
public interface IViewModeConfig
Properties
Description
Description of the view mode.
Declaration
string Description { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
Icon
Icon representing the view mode.
Declaration
Sprite Icon { get; set; }
Property Value
| Type | Description |
|---|---|
| Sprite |
Name
Name of the view mode.
Declaration
string Name { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
Methods
GetColorMapTextures(EntityManager, Entity)
Retrieves the collection of color map textures available for the specified terrain entity.
Declaration
IList<Texture2D> GetColorMapTextures(EntityManager entityManager, Entity terrainEntity)
Parameters
| Type | Name | Description |
|---|---|---|
| EntityManager | entityManager | The entity manager used to access and query entities and their components. |
| Entity | terrainEntity | The entity representing the terrain for which to retrieve color map textures. |
Returns
| Type | Description |
|---|---|
| IList<Texture2D> | A list of UnityEngine.Texture2D objects representing the color map textures for the specified terrain entity. The list is empty if no color map textures are found. |
UpdateColorMap(EntityManager, Entity, bool)
Updates the color map textures associated with the specified terrain entity in the given entity manager. This method can be used to refresh or modify the color map based on the current view mode state.
Declaration
bool UpdateColorMap(EntityManager entityManager, Entity terrainEntity, bool isViewModeDirty)
Parameters
| Type | Name | Description |
|---|---|---|
| EntityManager | entityManager | The entity manager that manages the entities and their components. Must not be null. |
| Entity | terrainEntity | The terrain entity whose color map textures are to be updated. |
| bool | isViewModeDirty | Indicates whether the view mode has changed and requires the color map to be refreshed. If true, the color map will be updated accordingly. |
Returns
| Type | Description |
|---|---|
| bool | true if the color map was updated; otherwise, false. Returns true if any data was changed, so the according logic can be applied after |