Skip to content

[Bug]: SendMessage Calls Due to DetectAssetChangeProcessor #234

@wallstop

Description

@wallstop

Description

It looks like our DetectAssetChangeProcessor triggers some workflows that can call SendMessage when unexpected, and produce lots of warnings in the Unity console. Very annoying

Steps to Reproduce

Integrate with the DetectAssetChangeProcessor. Change some assets, restart the editor, etc

Expected Behavior

No console warnings.

Actual Behavior

Console warnings.

Severity

Cosmetic (visual/UX issue)

Unity Version

2022.3 LTS

Package Version

3.2.1

Platform

  • Editor
  • Windows
  • macOS
  • Linux
  • iOS
  • Android
  • WebGL
  • Other

Regression

  • Yes, this is a regression (worked in a previous version)

Additional Context

SendMessage cannot be called during Awake, CheckConsistency, or OnValidate (Gauntlet_Finisher_Projectile: OnSpriteRendererBoundsChanged)

SendMessage cannot be called during Awake, CheckConsistency, or OnValidate (Gauntlet_Finisher_Projectile: OnSpriteTilingPropertyChange)

SendMessage cannot be called during Awake, CheckConsistency, or OnValidate (PlayerAfterImageTemplate: OnSpriteRendererBoundsChanged)

SendMessage cannot be called during Awake, CheckConsistency, or OnValidate (PlayerAfterImageTemplate: OnSpriteTilingPropertyChange)

SendMessage cannot be called during Awake, CheckConsistency, or OnValidate (Gauntlet_Finisher_Projectile: OnSpriteRendererBoundsChanged)
UnityEditor.AssetDatabase:LoadAllAssetsAtPath (string)
WallstopStudios.UnityHelpers.Editor.AssetProcessors.DetectAssetChangeProcessor:HasMatchingSubAsset (string,System.Type) (at ./Library/PackageCache/com.wallstop-studios.unity-helpers@3.2.1/Editor/AssetProcessors/DetectAssetChangeProcessor.cs:987)
WallstopStudios.UnityHelpers.Editor.AssetProcessors.DetectAssetChangeProcessor:AppendCreatedAssets (System.Type,System.Collections.Generic.IReadOnlyList1<string>,System.Collections.Generic.List1) (at ./Library/PackageCache/com.wallstop-studios.unity-helpers@3.2.1/Editor/AssetProcessors/DetectAssetChangeProcessor.cs:955)
WallstopStudios.UnityHelpers.Editor.AssetProcessors.DetectAssetChangeProcessor:CollectCreatedAssets (System.Type,System.Collections.Generic.IReadOnlyList1<string>,System.Collections.Generic.IReadOnlyList1) (at ./Library/PackageCache/com.wallstop-studios.unity-helpers@3.2.1/Editor/AssetProcessors/DetectAssetChangeProcessor.cs:922)
WallstopStudios.UnityHelpers.Editor.AssetProcessors.DetectAssetChangeProcessor:HandleAssetChanges (System.Collections.Generic.IReadOnlyList1<string>,System.Collections.Generic.IReadOnlyList1,System.Collections.Generic.IReadOnlyList1<string>,System.Collections.Generic.IReadOnlyList1) (at ./Library/PackageCache/com.wallstop-studios.unity-helpers@3.2.1/Editor/AssetProcessors/DetectAssetChangeProcessor.cs:373)
WallstopStudios.UnityHelpers.Editor.AssetProcessors.DetectAssetChangeProcessor:ProcessPendingAssetChanges () (at ./Library/PackageCache/com.wallstop-studios.unity-helpers@3.2.1/Editor/AssetProcessors/DetectAssetChangeProcessor.cs:330)
WallstopStudios.UnityHelpers.Editor.AssetProcessors.DetectAssetChangeProcessor:EnqueueAssetChanges (System.Collections.Generic.IReadOnlyList1<string>,System.Collections.Generic.IReadOnlyList1,System.Collections.Generic.IReadOnlyList1<string>,System.Collections.Generic.IReadOnlyList1) (at ./Library/PackageCache/com.wallstop-studios.unity-helpers@3.2.1/Editor/AssetProcessors/DetectAssetChangeProcessor.cs:307)
WallstopStudios.UnityHelpers.Editor.AssetProcessors.DetectAssetChangeProcessor:OnPostprocessAllAssets (string[],string[],string[],string[]) (at ./Library/PackageCache/com.wallstop-studios.unity-helpers@3.2.1/Editor/AssetProcessors/DetectAssetChangeProcessor.cs:283)
UnityEditor.AssetPostprocessingInternal:PostprocessAllAssets (string[],string[],string[],string[],string[],bool)

SendMessage cannot be called during Awake, CheckConsistency, or OnValidate (Gauntlet_Finisher_Projectile: OnSpriteTilingPropertyChange)
UnityEditor.AssetDatabase:LoadAllAssetsAtPath (string)
WallstopStudios.UnityHelpers.Editor.AssetProcessors.DetectAssetChangeProcessor:HasMatchingSubAsset (string,System.Type) (at ./Library/PackageCache/com.wallstop-studios.unity-helpers@3.2.1/Editor/AssetProcessors/DetectAssetChangeProcessor.cs:987)
WallstopStudios.UnityHelpers.Editor.AssetProcessors.DetectAssetChangeProcessor:AppendCreatedAssets (System.Type,System.Collections.Generic.IReadOnlyList1<string>,System.Collections.Generic.List1) (at ./Library/PackageCache/com.wallstop-studios.unity-helpers@3.2.1/Editor/AssetProcessors/DetectAssetChangeProcessor.cs:955)
WallstopStudios.UnityHelpers.Editor.AssetProcessors.DetectAssetChangeProcessor:CollectCreatedAssets (System.Type,System.Collections.Generic.IReadOnlyList1<string>,System.Collections.Generic.IReadOnlyList1) (at ./Library/PackageCache/com.wallstop-studios.unity-helpers@3.2.1/Editor/AssetProcessors/DetectAssetChangeProcessor.cs:922)
WallstopStudios.UnityHelpers.Editor.AssetProcessors.DetectAssetChangeProcessor:HandleAssetChanges (System.Collections.Generic.IReadOnlyList1<string>,System.Collections.Generic.IReadOnlyList1,System.Collections.Generic.IReadOnlyList1<string>,System.Collections.Generic.IReadOnlyList1) (at ./Library/PackageCache/com.wallstop-studios.unity-helpers@3.2.1/Editor/AssetProcessors/DetectAssetChangeProcessor.cs:373)
WallstopStudios.UnityHelpers.Editor.AssetProcessors.DetectAssetChangeProcessor:ProcessPendingAssetChanges () (at ./Library/PackageCache/com.wallstop-studios.unity-helpers@3.2.1/Editor/AssetProcessors/DetectAssetChangeProcessor.cs:330)
WallstopStudios.UnityHelpers.Editor.AssetProcessors.DetectAssetChangeProcessor:EnqueueAssetChanges (System.Collections.Generic.IReadOnlyList1<string>,System.Collections.Generic.IReadOnlyList1,System.Collections.Generic.IReadOnlyList1<string>,System.Collections.Generic.IReadOnlyList1) (at ./Library/PackageCache/com.wallstop-studios.unity-helpers@3.2.1/Editor/AssetProcessors/DetectAssetChangeProcessor.cs:307)
WallstopStudios.UnityHelpers.Editor.AssetProcessors.DetectAssetChangeProcessor:OnPostprocessAllAssets (string[],string[],string[],string[]) (at ./Library/PackageCache/com.wallstop-studios.unity-helpers@3.2.1/Editor/AssetProcessors/DetectAssetChangeProcessor.cs:283)
UnityEditor.AssetPostprocessingInternal:PostprocessAllAssets (string[],string[],string[],string[],string[],bool)

SendMessage cannot be called during Awake, CheckConsistency, or OnValidate (PlayerAfterImageTemplate: OnSpriteRendererBoundsChanged)
UnityEditor.AssetDatabase:LoadAllAssetsAtPath (string)
WallstopStudios.UnityHelpers.Editor.AssetProcessors.DetectAssetChangeProcessor:HasMatchingSubAsset (string,System.Type) (at ./Library/PackageCache/com.wallstop-studios.unity-helpers@3.2.1/Editor/AssetProcessors/DetectAssetChangeProcessor.cs:987)
WallstopStudios.UnityHelpers.Editor.AssetProcessors.DetectAssetChangeProcessor:AppendCreatedAssets (System.Type,System.Collections.Generic.IReadOnlyList1<string>,System.Collections.Generic.List1) (at ./Library/PackageCache/com.wallstop-studios.unity-helpers@3.2.1/Editor/AssetProcessors/DetectAssetChangeProcessor.cs:955)
WallstopStudios.UnityHelpers.Editor.AssetProcessors.DetectAssetChangeProcessor:CollectCreatedAssets (System.Type,System.Collections.Generic.IReadOnlyList1<string>,System.Collections.Generic.IReadOnlyList1) (at ./Library/PackageCache/com.wallstop-studios.unity-helpers@3.2.1/Editor/AssetProcessors/DetectAssetChangeProcessor.cs:922)
WallstopStudios.UnityHelpers.Editor.AssetProcessors.DetectAssetChangeProcessor:HandleAssetChanges (System.Collections.Generic.IReadOnlyList1<string>,System.Collections.Generic.IReadOnlyList1,System.Collections.Generic.IReadOnlyList1<string>,System.Collections.Generic.IReadOnlyList1) (at ./Library/PackageCache/com.wallstop-studios.unity-helpers@3.2.1/Editor/AssetProcessors/DetectAssetChangeProcessor.cs:373)
WallstopStudios.UnityHelpers.Editor.AssetProcessors.DetectAssetChangeProcessor:ProcessPendingAssetChanges () (at ./Library/PackageCache/com.wallstop-studios.unity-helpers@3.2.1/Editor/AssetProcessors/DetectAssetChangeProcessor.cs:330)
WallstopStudios.UnityHelpers.Editor.AssetProcessors.DetectAssetChangeProcessor:EnqueueAssetChanges (System.Collections.Generic.IReadOnlyList1<string>,System.Collections.Generic.IReadOnlyList1,System.Collections.Generic.IReadOnlyList1<string>,System.Collections.Generic.IReadOnlyList1) (at ./Library/PackageCache/com.wallstop-studios.unity-helpers@3.2.1/Editor/AssetProcessors/DetectAssetChangeProcessor.cs:307)
WallstopStudios.UnityHelpers.Editor.AssetProcessors.DetectAssetChangeProcessor:OnPostprocessAllAssets (string[],string[],string[],string[]) (at ./Library/PackageCache/com.wallstop-studios.unity-helpers@3.2.1/Editor/AssetProcessors/DetectAssetChangeProcessor.cs:283)
UnityEditor.AssetPostprocessingInternal:PostprocessAllAssets (string[],string[],string[],string[],string[],bool)

SendMessage cannot be called during Awake, CheckConsistency, or OnValidate (PlayerAfterImageTemplate: OnSpriteTilingPropertyChange)
UnityEditor.AssetDatabase:LoadAllAssetsAtPath (string)
WallstopStudios.UnityHelpers.Editor.AssetProcessors.DetectAssetChangeProcessor:HasMatchingSubAsset (string,System.Type) (at ./Library/PackageCache/com.wallstop-studios.unity-helpers@3.2.1/Editor/AssetProcessors/DetectAssetChangeProcessor.cs:987)
WallstopStudios.UnityHelpers.Editor.AssetProcessors.DetectAssetChangeProcessor:AppendCreatedAssets (System.Type,System.Collections.Generic.IReadOnlyList1<string>,System.Collections.Generic.List1) (at ./Library/PackageCache/com.wallstop-studios.unity-helpers@3.2.1/Editor/AssetProcessors/DetectAssetChangeProcessor.cs:955)
WallstopStudios.UnityHelpers.Editor.AssetProcessors.DetectAssetChangeProcessor:CollectCreatedAssets (System.Type,System.Collections.Generic.IReadOnlyList1<string>,System.Collections.Generic.IReadOnlyList1) (at ./Library/PackageCache/com.wallstop-studios.unity-helpers@3.2.1/Editor/AssetProcessors/DetectAssetChangeProcessor.cs:922)
WallstopStudios.UnityHelpers.Editor.AssetProcessors.DetectAssetChangeProcessor:HandleAssetChanges (System.Collections.Generic.IReadOnlyList1<string>,System.Collections.Generic.IReadOnlyList1,System.Collections.Generic.IReadOnlyList1<string>,System.Collections.Generic.IReadOnlyList1) (at ./Library/PackageCache/com.wallstop-studios.unity-helpers@3.2.1/Editor/AssetProcessors/DetectAssetChangeProcessor.cs:373)
WallstopStudios.UnityHelpers.Editor.AssetProcessors.DetectAssetChangeProcessor:ProcessPendingAssetChanges () (at ./Library/PackageCache/com.wallstop-studios.unity-helpers@3.2.1/Editor/AssetProcessors/DetectAssetChangeProcessor.cs:330)
WallstopStudios.UnityHelpers.Editor.AssetProcessors.DetectAssetChangeProcessor:EnqueueAssetChanges (System.Collections.Generic.IReadOnlyList1<string>,System.Collections.Generic.IReadOnlyList1,System.Collections.Generic.IReadOnlyList1<string>,System.Collections.Generic.IReadOnlyList1) (at ./Library/PackageCache/com.wallstop-studios.unity-helpers@3.2.1/Editor/AssetProcessors/DetectAssetChangeProcessor.cs:307)
WallstopStudios.UnityHelpers.Editor.AssetProcessors.DetectAssetChangeProcessor:OnPostprocessAllAssets (string[],string[],string[],string[]) (at ./Library/PackageCache/com.wallstop-studios.unity-helpers@3.2.1/Editor/AssetProcessors/DetectAssetChangeProcessor.cs:283)
UnityEditor.AssetPostprocessingInternal:PostprocessAllAssets (string[],string[],string[],string[],string[],bool)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions