V1.3.0 Pointy Hexes and Block Meshes

  • Added block meshes: These procedurally generated meshes sit on top of blocks and are useful for water, lava, or other liquids. 
  • Added a new sample called S_ProceduralMesh. In this sample, you can paint and erase water from the environment.
  • Added support for non-scaling block objects (see the BlockScalingBehavior). This makes stacking blocks much easier.
  • Made it easier to add different block prefabs for the same grid type. Block prefabs now have a resource code that can be associated to a data class, which is verified in update jobs.
  • Added support for pointy-hex grid type (see GridType). 
  • Improved the sample camera script (used for culling) to not need to update view bounds as often.
  • The InitializeLayer logic on the TerrainObjectManager is now optional. You could always inherit from the TerrainObjectManager and insert your own logic, but this makes it easier to configure out of the box.
  • Improved block and block component change verification to require fewer jobs scheduled to update changes.
  • Baker systems have been changed to implement ISystem instead of SystemBase.
  • The UseCulling variable is now a CullingTypeCode. There are now three options: off, on, and ignore update. Ignore update is new and does not remove entities outside of view but instead just ignores them in update jobs.
  • Removed the MeshTerrainTypes. The MeshStyleTileMap is now used instead.
  • Added new customizable world variables:
    • Tile Component Tier determines which block component tier changes block vertical positioning.
    • Block Component Tiers determines which component tiers are used to index block components on each grid position in certain methods.
    • Grid Cell Scale informs position scaling on the grid, which allows the block data scale to be different from the grid cell scale.
    • Block Rotation: adds to all block rotations.
    • Mesh Visual Offset determines how far vertically offset a generated mesh is off of each block.
  • Mesh Chunk Radius determines how big each mesh chunk can be.
  • Added new Customizable block variables:
  • MeshWElevation determines the mesh W and elevation. This is useful for offsetting water or other meshes away from a block without needing to create a new layer or invisible block for the mesh.
  • Memory usage improvements:
  • Grid positions are no longer indexed in native collections. Instead, integer hash codes of grid positions are used. 
  • GBlockData, GBlockComponentData, and GBlockMeshData no longer are added to entities. Instead, BlockEntityData, GBlockComponentEntityData, and GBlockMeshEntityData are used as components to index data from native collections, which could be modified inside or outside a job. This essentially cuts the memory usage of Hewn Core entities in half.
  • Fixed several areas where native collections were not properly disposed.
  • Moved material and animation data into separate components, so that when a block doesn’t have a model, or animation is disabled, these components don’t consume memory unnecessarily.
  • Added support for blocks without an associated model, for increased performance in situations where the entity is a parent to many children renderers. Note: when blocks have no model, many visual-related components are not added to the block entity. Use the HasModel bool on a GBlockEntityDataProxy prefab to toggle baking behavior for meshes on and off.