I’m attempting to update the tiling of a material’s texture from the code in ECS. But, applying this MaterialProperty component to an entity and updating it’s value provides no change to the material.
Steps:
- Start runtime
- Component does get added to the entity correctly
- Value of the added component is correct
- Value has no affect on the actual rendering even when manipulating at runtime in the inspector
Component
[MaterialProperty("_BaseMap_ST")]
public struct MaterialPropertyBaseMapST : IComponentData
{
public float4 Value;
}
Implementation
_entityManager.AddComponentData(sidewalkEntity, new MaterialPropertyBaseMapST
{
Value = new float4(1, scale.z / 200, 0, 0) // xy is scale, zw is offset
});
Based on my research, I am using the correct property for URP. Any advice would be appreciated.
Render pipeline: URP
Unity version: 6000.0.25f1
Entities version: 1.3.5
Entities Graphics version: 1.3.2