Skip to content

Project Settings Flags (GenerateDefaultNetworkPrefabs) are Ignored #2572

@Reag

Description

@Reag

Description

Setting the GenerateDefaultNetworkPrefabsList flag in the Project Settings -> Netcode for GameObjects does not appear to be respected. Specifically, it writes the value to file, but on an editor refresh, it does not load said settings. In addition, said settings file appears to be a .settings, rather than a .assets like all other parts of Project Settings.

Reproduce Steps

  1. Load a project
  2. Disable GenerateDefaultNetworkPrefabsList in Project Settings -> Netcode for GameObjects
  3. Save and Quit Unity, optionally verify that the .settings file has updated
  4. Launch Unity and check the project settings flag you just set

Actual Outcome

Flag GenerateDefaultNetworkPrefabs is always true, no matter what is in the settings file at the launch of the unity editor

Expected Outcome

Flag will match what is in the settings file.

Screenshots

image

You can clearly see I have the flag set to false on my disk, but the editor has loaded true.

Raw File generated is below. Note the MonoBehavior: header, rather than NetcodeSettings. This appears to break from the standard other project components use in Unity (Say, GraphicsSettings)

%TAG !u! tag:unity3d.com,2011:
--- !u!114 &1
MonoBehaviour:
  m_ObjectHideFlags: 61
  m_CorrespondingSourceObject: {fileID: 0}
  m_PrefabInstance: {fileID: 0}
  m_PrefabAsset: {fileID: 0}
  m_GameObject: {fileID: 0}
  m_Enabled: 1
  m_EditorHideFlags: 0
  m_Script: {fileID: 0}
  m_Name: 
  m_EditorClassIdentifier: Unity.Netcode.Editor:Unity.Netcode.Editor.Configuration:NetcodeForGameObjectsProjectSettings
  GenerateDefaultNetworkPrefabs: 0

Environment

  • OS: Windows 10
  • Unity Version: 2021.3.25f1
  • Netcode Version: 1.4.0

Additional Context

I'm going to have to deal with my junior developers accidentally committing the default asset list now ;-;

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions