You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Addressables build fails if ModIOBrowser from Assets/Plugins/mod.io/UI/Examples/ModIOBrowser.prefab is in a Scene because the asset Assets/Plugins/mod.io/UI/Sprites/modio-icon-color.png is marked with HideFlags.DontSave
#7
Open
Raidenxd2 opened this issue
May 16, 2024
· 1 comment
Have no if this is a Unity issue or a mod.io issue
Title, the only way to temporary fix this is to restart the Editor.
The reason why I say "temporary" is because when you modify the Scene that contains the ModIoBrowser prefab or clear the build cache, it fails again
Blank Unity project (template '3D (Built-In Render Pipeline').
Errors on Addressable build
Error 1: An asset is marked with HideFlags.DontSave but is included in the build: Asset: 'Assets/Plugins/mod.io/UI/Sprites/modio-icon-color.png' Included from scene: 'Assets/Scenes/ModIoScene.unity' Asset name: modio-icon-color (You are probably referencing internal Unity data in your build.) UnityEditor.GenericMenu:CatchMenu (object,string[],int)
Found out how to fix it.
The reason this is happening is because scripts are using the same icon that some UI elements are using.
I fixed by duplicating Assets/Plugins/mod.io/UI/Sprites/modio-icon-color.png as modio-icon-color-script.png and changing its texture type to Editor GUI and Legacy GUI
These are the scripts that have this icon (they are all under Assets/Plugins/mod.io/UI)
Color Scheme/ColorScheme.cs
Color Scheme/ColorSetter.cs
Color Scheme/MultiTargetButton.cs
Color Scheme/MultiTargetDropdown.cs
Color Scheme/MultiTargetToggle.cs
Overlays/SelectionOverlayHandler.cs
Scripts/Browser.cs
Scripts/InputReceiver.cs
Utility/ViewportRestraint.cs
Unity version: 2022.3.29f1
Addressables version: 1.21.21
Scriptable Build Pipeline version: 1.21.23
Mod.io version: v2024.3.1p1
Have no if this is a Unity issue or a mod.io issue
Title, the only way to temporary fix this is to restart the Editor.
The reason why I say "temporary" is because when you modify the Scene that contains the ModIoBrowser prefab or clear the build cache, it fails again
Blank Unity project (template '3D (Built-In Render Pipeline').
Errors on Addressable build
Error 1:
An asset is marked with HideFlags.DontSave but is included in the build: Asset: 'Assets/Plugins/mod.io/UI/Sprites/modio-icon-color.png' Included from scene: 'Assets/Scenes/ModIoScene.unity' Asset name: modio-icon-color (You are probably referencing internal Unity data in your build.) UnityEditor.GenericMenu:CatchMenu (object,string[],int)
Error 2:
Assertion failed on expression: 'm_LockCount == 0' UnityEditor.GenericMenu:CatchMenu (object,string[],int)
Error 3:
Build Task WriteSerializedFiles failed with exception: Could not find file "E:\Stuff\stuff\ModIoAddressablesTest\Library\BuildCache\c6\c6ffc3440e239d2963c8dd27ab1a16dd\81e0980ee0c78fb2f9e216fdae7205d1\CAB-bc35dac5a8e94bc239d1b52bd86bc27f.sharedAssets" at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.Int32 bufferSize, System.Boolean anonymous, System.IO.FileOptions options) [0x0019e] in <467a840a914a47078e4ae9b0b1e8779e>:0 at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.Int32 bufferSize, System.Boolean isAsync, System.Boolean anonymous) [0x00000] in <467a840a914a47078e4ae9b0b1e8779e>:0 at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access) [0x00000] in <467a840a914a47078e4ae9b0b1e8779e>:0 at (wrapper remoting-invoke-with-check) System.IO.FileStream..ctor(string,System.IO.FileMode,System.IO.FileAccess) at UnityEditor.Build.Pipeline.Utilities.HashingMethods.CalculateFile (System.String filePath) [0x00000] in .\Library\PackageCache\com.unity.scriptablebuildpipeline@1.21.23\Editor\Utilities\HashingMethods.cs:488 at UnityEditor.Build.Pipeline.Tasks.WriteSerializedFiles.CalculateFileMetadata (UnityEditor.Build.Content.WriteResult& result) [0x0002f] in .\Library\PackageCache\com.unity.scriptablebuildpipeline@1.21.23\Editor\Tasks\WriteSerializedFiles.cs:134 at UnityEditor.Build.Pipeline.Tasks.WriteSerializedFiles.UnityEditor.Build.Pipeline.Utilities.TaskCachingUtility.IRunCachedCallbacks<UnityEditor.Build.Pipeline.Tasks.WriteSerializedFiles.Item>.ProcessUncached (UnityEditor.Build.Pipeline.Utilities.TaskCachingUtility+WorkItem
1[T] item) [0x000bb] in .\Library\PackageCache\com.unity.scriptablebuildpipeline@1.21.23\Editor\Tasks\WriteSerializedFiles.cs:178at UnityEditor.Build.Pipeline.Utilities.TaskCachingUtility.RunCachedOperation[T] (UnityEditor.Build.Pipeline.Interfaces.IBuildCache cache, UnityEditor.Build.Pipeline.Interfaces.IBuildLogger log, UnityEditor.Build.Pipeline.Interfaces.IProgressTracker tracker, System.Collections.Generic.List
1[T] workItems, UnityEditor.Build.Pipeline.Utilities.TaskCachingUtility+IRunCachedCallbacks
1[T] cbs) [0x00177] in .\Library\PackageCache\com.unity.scriptablebuildpipeline@1.21.23\Editor\Utilities\TaskCachingUtility.cs:100at UnityEditor.Build.Pipeline.Tasks.WriteSerializedFiles.Run () [0x0003b] in .\Library\PackageCache\com.unity.scriptablebuildpipeline@1.21.23\Editor\Tasks\WriteSerializedFiles.cs:120
at UnityEditor.Build.Pipeline.BuildTasksRunner.Run (System.Collections.Generic.IList
1[T] pipeline, UnityEditor.Build.Pipeline.Interfaces.IBuildContext context) [0x0009d] in .\Library\PackageCache\com.unity.scriptablebuildpipeline@1.21.23\Editor\Shared\BuildTasksRunner.cs:56 UnityEditor.GenericMenu:CatchMenu (object,string[],int)
Error 4:
SBP ErrorException UnityEditor.GenericMenu:CatchMenu (object,string[],int)
Error 5:
Addressable content build failure (duration : 0:00:11.629) UnityEditor.GenericMenu:CatchMenu (object,string[],int)
After restarting the Editor, the build succeeds
I also tried to search through the code for 'HideFlags.DontSave' and 'HideFlags' but couldn't find anything.
The text was updated successfully, but these errors were encountered: