I’m experimenting with compute shaders in Unity. A pretty typical thing you wanna do is marshal a buffer of structs back and fourth between C# and HLSL land. Ordinarily you’d have to manually define an identical struct in both C# and HLSL to do this. But Unity provides a convenient
(GenerateHLSL(PackingRules.Exact, false)) attribute that you can prepend to any struct and have it auto-generate an HLSL counter-part. The thing is, is I can’t figure out a way to trigger this manually via scripting. Right now, I’m forced to manually go Edit > Render Pipeline > Generate Shader Includes Everytime I make changes to the marshaled struct.
Anybody know the function I can call to trigger this via scripts?