Parameters don't work with Custom Code

Hello there,

As soon as I’m adding a Custom Code node to a material, the Parameters stop working.
Is this a bug or do I have to consider something?

That’s because the asset failed to load. See Output window to learn why material shader failed to compile (probably caused the loading fail).

The material works without errors.

All I do is click “Add parameter …” and then I get the following:

[ 00:00:27.271 ]: [Error] Failed to compile 'f564a3d595024e5394434a8da2bee411'. C:\Users\Oliver\Documents\Flax Projects\FlaxSamples\BasicTemplate\f564a3d595024e5394434a8da2bee411(381,22-78): error X3087: float object does not have methods

[ 00:00:27.271 ]: [Error] Failed to compile 'VS'
[ 00:00:27.271 ]: [Error] Failed to compile shader 'FlaxEngine.Material, f564a3d54e5395028d4a439411e4bea2, C:\Users/Oliver/AppData/Local/Temp/6877282f-498e-1571-3041-63ad1136def8/f564a3d595024e5394434a8da2bee411.flax'
[ 00:00:27.271 ]: [Error] Cannot load 'FlaxEngine.Material, f564a3d54e5395028d4a439411e4bea2, C:\Users/Oliver/AppData/Local/Temp/6877282f-498e-1571-3041-63ad1136def8/f564a3d595024e5394434a8da2bee411.flax' shader cache.
[ 00:00:27.271 ]: [Error] Loading asset 'FlaxEngine.Material, f564a3d54e5395028d4a439411e4bea2, C:\Users/Oliver/AppData/Local/Temp/6877282f-498e-1571-3041-63ad1136def8/f564a3d595024e5394434a8da2bee411.flax' result: Failed.
[ 00:00:27.271 ]: [Warning] 'Content Load Task LoadAsset (Running)' failed with result: AssetLoadError

Maybe not directly related to the problem(or maybe it is), but shouldn’t it be float4 instead of float? Can the material even be saved that way without an error message? I’m talking about Output0=float(1,0,0,0) in the image.

You’re correct. I mistyped that in my example. But I have a working, compiled material that stops working after I add a parameter. But I suspect that the problem is not the material.

I can recreate the problem by creating a new empty material, adding a “Custom Code” node, saving it and then trying to add a Parameter. This also errors out.

Curiously this is only happening on my main machine in engine version 1.3.6228. On a second machine in the “master branch” version it works just fine.