Search Unity

Bug Saving has no effect. Your class is missing the FilePath

Discussion in 'Web' started by andyz, Jan 29, 2024.

  1. andyz

    andyz

    Joined:
    Jan 5, 2010
    Posts:
    2,276
    I thought 2022 LTS would have less odd console messages! /rant

    I get this after webgl builds:
    Saving has no effect. Your class 'UnityEditor.WebGL.HttpServerEditorWrapper' is missing the FilePathAttribute. Use this attribute to specify where to save your ScriptableSingleton.

    No idea what this is talking about!

    Full text:
    Code (CSharp):
    1. Saving has no effect. Your class 'UnityEditor.WebGL.HttpServerEditorWrapper' is missing the FilePathAttribute. Use this attribute to specify where to save your ScriptableSingleton.
    2. Only call Save() and use this attribute if you want your state to survive between sessions of Unity.
    3. UnityEngine.StackTraceUtility:ExtractStackTrace ()
    4. UnityEngine.DebugLogHandler:LogFormat (UnityEngine.LogType,UnityEngine.Object,string,object[])
    5. UnityEngine.Logger:Log (UnityEngine.LogType,object)
    6. UnityEngine.Debug:LogWarning (object)
    7. UnityEditor.ScriptableSingleton`1<UnityEditor.WebGL.HttpServerEditorWrapper>:Save (bool)
    8. UnityEditor.WebGL.HttpServerEditorWrapper:Create (string,int)
    9. UnityEditor.WebGL.HttpServerEditorWrapper:CreateIfNeeded (string,int&)
    10. UnityEditor.WebGL.WebGlBuildPostprocessor:LaunchPlayer (UnityEditor.Modules.BuildLaunchPlayerArgs)
    11. UnityEditor.PostprocessBuildPlayer:Launch (UnityEditor.BuildTargetGroup,UnityEditor.BuildTarget,string,string,UnityEditor.BuildOptions,UnityEditor.Build.Reporting.BuildReport)
    12. UnityEditor.BuildPlayerWindow/DefaultBuildMethods:BuildPlayer (UnityEditor.BuildPlayerOptions)
    13. UnityEditor.BuildPlayerWindow:CallBuildMethods (bool,UnityEditor.BuildOptions)
    14. UnityEditor.BuildPlayerWindow:BuildPlayerAndRun (bool)
    15. UnityEditor.BuildPlayerWindow:BuildPlayerAndRun ()
     
    Last edited: Jan 29, 2024
    bugfinders likes this.
  2. unityruba

    unityruba

    Unity Technologies

    Joined:
    Nov 6, 2020
    Posts:
    273
    Sorry about the warning! Can you share a project/script that produces this warning. I've never seen it before so it'll speed up the looking-into-it part :)
     
  3. andyz

    andyz

    Joined:
    Jan 5, 2010
    Posts:
    2,276
    It happens in a brand new URP/UI project, but here is a case report: IN-67385
     
  4. andyz

    andyz

    Joined:
    Jan 5, 2010
    Posts:
    2,276
    Last edited: Jan 30, 2024
  5. unityruba

    unityruba

    Unity Technologies

    Joined:
    Nov 6, 2020
    Posts:
    273
    Hi @andyz . You're right. That message is generic. I'll bring it up with the team to see if we can refine it, I'm not sure how fast that will happen. However, we are adding a task to address this warning so our implementation of HttpServerEditorWrapper doesn't trigger it.
     
    andyz likes this.
  6. MrKoaLa242545

    MrKoaLa242545

    Joined:
    Jan 2, 2024
    Posts:
    2
    i found this problem too.
    Did u have something news?
    "
    Saving has no effect. Your class 'UnityEditor.WebGL.HttpServerEditorWrapper' is missing the FilePathAttribute. Use this attribute to specify where to save your ScriptableSingleton.
    Only call Save() and use this attribute if you want your state to survive between sessions of Unity.
    UnityEditor.BuildPlayerWindow:BuildPlayerAndRun ()
    "