GenesisMaps
GenesisMaps groups the texture and UV controls of a Genesis material — albedo, normal, detail, and layer maps, plus per-slot tiling, offset, and UV channel selection. It is accessed through GenesisMaterial.Maps, making runtime texture swaps and biome streaming type-safe.
using Genesis.Runtime;
var gm = new GenesisMaterial(GetComponent<Renderer>());
gm.Maps.SetAlbedo(grassAlbedo);
gm.Maps.SetNormal(grassNormal, 1.2f);
gm.Maps.SetTiling(new Vector2(4f, 4f));
gm.Apply();Texture references cannot travel through a MaterialPropertyBlock on every SRP path, so SetAlbedo/SetNormal may write to the shared material. Group renderers that need different textures onto different materials, or use Layer Textures and blend masks instead of per-instance swaps.
Properties
Methods
Examples
Swap a material to a snow biome
using Genesis.Runtime;
using UnityEngine;
public class BiomeSwap : MonoBehaviour
{
[SerializeField] Renderer target;
[SerializeField] Texture2D snowAlbedo, snowNormal;
public void ToSnow()
{
var gm = new GenesisMaterial(target);
gm.Maps.SetAlbedo(snowAlbedo);
gm.Maps.SetNormal(snowNormal, 0.8f);
gm.Maps.SetTiling(new Vector2(6f, 6f));
gm.Apply();
gm.Dispose();
}
}Add a moss detail layer
public void AddMoss(GenesisMaterial gm, Texture2D mossA, Texture2D mossN)
{
gm.Maps.SetDetail(mossA, mossN, new Vector2(12f, 12f));
gm.Maps.DetailStrength = 0.7f;
gm.Apply();
}Frequent runtime texture swaps fragment batches and can trigger streaming hitches. For variation across many instances prefer Layer Textures or Triplanar with masks over swapping _BaseMap per renderer.