Forum rules - please read before posting.

ACEditorPrefs.asset strangeness

edited June 2023 in Technical Q&A

Hi there,

Just a heads up, but this file is often causing me trouble. I noticed that it often gets overwritten.
Every AC update overwrites it, that might be hard to fix though. But today, I modified it on computer A, pushed it to Git, pulled from git on another computer and opened up Unity. Git shows me that the change made on computer A is now got overwritten by the one on Computer B. It's as if that file is being regenerated every time Unity is opened or something...

I found these two errors on the Unity console:

Unable to import newly created asset : Assets/AdventureCreator/Editor/ACEditorPrefs.asset
UnityEngine.StackTraceUtility:ExtractStackTrace ()
AC.ACEditorPrefs:GetOrCreateSettings () (at Assets/AdventureCreator/Scripts/Managers/ACEditorPrefs.cs:106)
AC.ACEditorPrefs:get_DisableInstaller () (at Assets/AdventureCreator/Scripts/Managers/ACEditorPrefs.cs:434)
AC.ACInstaller:IsInstalled () (at Assets/AdventureCreator/Scripts/Managers/Editor/ACInstaller.cs:37)
AC.ACInstaller:CheckInstall () (at Assets/AdventureCreator/Scripts/Managers/Editor/ACInstaller.cs:52)
AC.ACInstaller:.cctor () (at Assets/AdventureCreator/Scripts/Managers/Editor/ACInstaller.cs:31)
UnityEditor.EditorAssemblies:ProcessInitializeOnLoadAttributes (System.Type[])

UnityException: Creating asset at path Assets/AdventureCreator/Editor/ACEditorPrefs.asset failed.
AC.ACEditorPrefs.GetOrCreateSettings () (at Assets/AdventureCreator/Scripts/Managers/ACEditorPrefs.cs:106)
UnityEngine.Debug:LogException(Exception)
AC.ACEditorPrefs:GetOrCreateSettings() (at Assets/AdventureCreator/Scripts/Managers/ACEditorPrefs.cs:112)
AC.ACEditorPrefs:get_DisableInstaller() (at Assets/AdventureCreator/Scripts/Managers/ACEditorPrefs.cs:434)
AC.ACInstaller:IsInstalled() (at Assets/AdventureCreator/Scripts/Managers/Editor/ACInstaller.cs:37)
AC.ACInstaller:CheckInstall() (at Assets/AdventureCreator/Scripts/Managers/Editor/ACInstaller.cs:52)
AC.ACInstaller:.cctor() (at Assets/AdventureCreator/Scripts/Managers/Editor/ACInstaller.cs:31)
UnityEditor.EditorAssemblies:ProcessInitializeOnLoadAttributes(Type[])

Thanks!

Comments

  • The asset being reverted upon updating AC can be prevented by omitting it from the Import Package window.

    Are you able to reliably recreate the error messages? If so, open up ACEditorPrefs.cs, and look for the line:

    settings = CreateInstance<ACEditorPrefs> ();
    

    Just above, copy/paste:

    settings = AssetDatabase.LoadAssetAtPath<ACEditorPrefs> (fullPath);
    if (settings) return settings;
    

    Does that prevent the errors from showing?

  • Unfortunately the issue remains.
  • At what point does the error show? Is it possible to have it appear reliably without using version control so that I might be able to see it on my end?

  • Sorry, I only got it to show up using version control with two computers as described above...

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.