Defining a function in a struct in a custom node works on Windows but not Android. Would appreciate a workaround.

I think I have run into a bug with the material Custom HLSL node.
When defining a function inside a struct as shown at Extending Custom HLSL / Custom Expressions - Rendering - Epic Developer Community Forums , the material works, compiles and runs fine in a standalone Windows built. However, when I choose to launch the program to Android (4.4.4 GLSL_ES2) the compilation fails. It appears as though one can still define the struct as long as one doesn’t define a function inside.

Does anyone please know of a workaround to still define a function inside of a ‘custom’ material node that does work for Android?

Sample code that fails on Android but works on Windows:

struct Test
{
float2 T()
{
return (float2(0,1));
}
};
return 0.2;

Any help would be greatly appreciated.

Kind Regards