AotStubs - Compilation issue


I am currently encountering weird bug since I tried to use GraphicsSettings.currentRenderPipeline.SetMSAASampleCount in Unity Visual Scripting graph.

I added Universal Renderer Pipeline in the Node library in the Project Settings so everything works in editor.

My error appears during build on Android (Mono and IL2CPP) with Unity 2021.1.0f1 :

Assets\Unity.VisualScripting.Generated\VisualScripting.Core\AotStubs.cs(4349,4): error CS0200: Property or indexer 'GraphicsSettings.videoShadersIncludeMode' cannot be assigned to -- it is read only

I don’t know why but the compilation fails, even if the property is not read only:

public static VideoShadersIncludeMode videoShadersIncludeMode

I checked that with ILSpy.

I removed Universal Renderer Pipeline from the Node library to stop generating the method but it didn’t improve the situation.

Any idea?

Finally, it was indeed the use of the GraphicsSettings.currentRenderPipeline.SetMSAASampleCount in a Visual Scripting graph that was the origin of the issue (even if the graph is just in an unused asset)…