# Set Custom Data Value Node Mark Render State Dirty Not Working in Standalone For HISM. Works for ISM

**URL:** <https://forums.unrealengine.com/t/set-custom-data-value-node-mark-render-state-dirty-not-working-in-standalone-for-hism-works-for-ism/491249>\
**Category:** Rendering\
**Tags:** hism, Instanced-Mesh, unreal-engine, Rendering, Shaders, question\
**Created:** [November 23, 2021, 10:55pm UTC](https://forums.unrealengine.com/t/set-custom-data-value-node-mark-render-state-dirty-not-working-in-standalone-for-hism-works-for-ism/491249 "2021-11-23T22:55:15Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![NtrickN](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/ntrickn/32/474191_2.png) [@NtrickN](https://forums.unrealengine.com/u/NtrickN)\
**Post date:** [November 23, 2021, 10:55pm UTC](https://forums.unrealengine.com/t/set-custom-data-value-node-mark-render-state-dirty-not-working-in-standalone-for-hism-works-for-ism/491249/1 "2021-11-23T22:55:15Z")

</div>

Setting a custom data value via **per instance custom data** node, Mark Render State Dirty true, for a given mesh within the **Hierarchical Instanced Static Mesh** component does not update properly at run-time for standalone or packaged games. Works fine in editor viewport or PIE.

Found this while attempting to solve this issue: [[Material Custom Primitive Data Not Updating Each Frame In Standalone - Fine In Editor - Rendering - Unreal Engine Forums](https://answers.unrealengine.com/questions/1058193/view.html)][1]

Repeatable Steps

1. New blank project
2. Start Content Cube and Cube Material
3. Create a BP Actor with a HISM
4. Set the mesh to starter cube, and material to start cube material
5. Add 1 instance
6. Num Custom Data Floats to 1
7. In actor BP, on event tick, use **Set Custom Data Value** node to set instance index 0 and custom data index 0 to a value driven by **Random Integer** node. Check the **Mark Render State Dirty** bool.

 ![352904-hism.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/c/a/a/caa6688f325988fb9da3b0f5e6b1bf9bf6708055.png)

1. In cube material, add a **PerInstanceCustomData** node. Route that into **VertexInterpolator** node. Route the interpolator into **DebugScalarValues** node. Route the debug into base color to see it on the cube.

 ![352905-cubemat.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/8/c/6/8c69bf2d65636cff2cd4533b623f057559fa25d7.jpeg)

1. This works as intended in editor, updating the base color to the random int value as expected.
2. Standalone or Packaged game does not update
3. The value appears visually only if you modify the HISM instance count or toggle any options.
4. Duplicate this BP and replace with ISM - everything works as expected in standalone.

 ![352906-testhism.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/c/3/7c3428a6204c40732a2430c2aea0ff13e28a5d4a.jpeg)

---

<div class="post-metadata">

**Author:** ![Piotr.Bak2](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Piotr.Bak2](https://forums.unrealengine.com/u/Piotr.Bak2)\
**Post date:** [August 20, 2024, 8:53am UTC](https://forums.unrealengine.com/t/set-custom-data-value-node-mark-render-state-dirty-not-working-in-standalone-for-hism-works-for-ism/491249/2 "2024-08-20T08:53:58Z")

</div>

Hi, it seems fix is pretty trivial, but you will need sources to fix it.

 ![BCompare_rs43kZyq6F](https://d3kjluh73b9h9o.cloudfront.net/original/4X/a/1/2/a121a87c5c252be827164a193f03a527c2245104.png)

Basically editor enforces CPUAccess with GIsEditor and we need to mimic that behaviour, we know how many custom float we will provide in the future, soo using NumCustomDataFloats \> 0 should be fine, of course one may use different condition.

Fix is only valid for UE4.27.

---

<div class="post-metadata">

**Author:** ![Silentwind](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Silentwind](https://forums.unrealengine.com/u/Silentwind)\
**Post date:** [January 16, 2025, 8:13am UTC](https://forums.unrealengine.com/t/set-custom-data-value-node-mark-render-state-dirty-not-working-in-standalone-for-hism-works-for-ism/491249/3 "2025-01-16T08:13:28Z")

</div>

Got the exact same issue in Unreal 5.3 for mobile.

This could be fixed by Enable “Enable GPUScene on Mobile” in project settings.
