This error Occurred in New Project and it has nothing just the sample scene

Type ‘[Unity.RenderPipelines.Core.Runtime]UnityEngine.Rendering.DebugActionDesc’ has an extra field ‘axisTrigger’ of type ‘System.String’ in the player and thus can’t be serialized (expected ‘repeatMode’ of type ‘UnityEngine.Rendering.DebugActionRepeatMode’)
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)

1 Like

The same in Unity 6000.0.29f1. Can’t build project.

Type ‘[Unity.RenderPipelines.Core.Runtime]UnityEngine.Rendering.DebugActionDesc’ has an extra field ‘axisTrigger’ of type ‘System.String’ in the player and thus can’t be serialized (expected ‘repeatMode’ of type ‘UnityEngine.Rendering.DebugActionRepeatMode’)
UnityEditor.BuildPlayerWindow:BuildPlayerAndRun ()

Fields serialized in Editor, class ‘UnityEngine.Rendering.DebugActionDesc’
‘buttonAction’ of type ‘UnityEngine.InputSystem.InputAction’
‘repeatMode’ of type ‘UnityEngine.Rendering.DebugActionRepeatMode’
‘repeatDelay’ of type ‘System.Single’

UnityEditor.BuildPlayerWindow:BuildPlayerAndRun ()

Error building player because script class layout is incompatible between the editor and the player.

Build completed with a result of ‘Failed’ in 3 seconds (3117 ms)
4 errors
UnityEditor.BuildPlayerWindow:BuildPlayerAndRun ()

this is going to be a very wierd solution but hear me out, lol…
i was getting same error and it got resolved after i did the following:

Step 1: Run all scenes separately in editor. (Build failed after this)
Step 2: Runt the scene 0 and in editor and just traverse through all the scenes that are in your build settings one by one. That’s it…

After the step 2, my APKs started to build fine…

Don’t know how it happened, don’t wanna know how it happened… it just worked. :slight_smile: