Skip to content

[Bug]: SendMessage cannot be called during Awake... #280

Description

Description

SendMessage cannot be called during Awake, CheckConsistency, or OnValidate (Water Color: OnMeshFilterChanged)
UnityEngine.MeshFilter:set_sharedMesh (UnityEngine.Mesh)
WaterMesh2D:BuildMesh () (at Assets/Scripts/Rendering/WaterMesh2D.cs:629)
WaterMesh2D:Generate () (at Assets/Scripts/Rendering/WaterMesh2D.cs:519)
WaterMesh2D:ApplySettings (WaterMesh2D/WaterSettings,WaterMesh2D/WaterShaderSettings) (at Assets/Scripts/Rendering/WaterMesh2D.cs:358)
WaterEnvironment:UpdateActionSize () (at Assets/Scripts/EnvironmentalEffects/WaterEnvironment.cs:258)
EnvironmentalEffectBase:OnValidate () (at Assets/Scripts/EnvironmentalEffects/EnvironmentalEffectBase.cs:204)
UnityEditor.AssetDatabase:LoadAllAssetsAtPath (string)
WallstopStudios.UnityHelpers.Editor.AssetProcessors.DetectAssetChangeProcessor:HasMatchingSubAsset (string,System.Type) (at ./Library/PackageCache/[email protected]/Editor/AssetProcessors/DetectAssetChangeProcessor.cs:1054)
WallstopStudios.UnityHelpers.Editor.AssetProcessors.DetectAssetChangeProcessor:AppendCreatedAssets (System.Type,System.Collections.Generic.IReadOnlyList1<string>,System.Collections.Generic.List1) (at ./Library/PackageCache/[email protected]/Editor/AssetProcessors/DetectAssetChangeProcessor.cs:1022)
WallstopStudios.UnityHelpers.Editor.AssetProcessors.DetectAssetChangeProcessor:CollectCreatedAssets (System.Type,System.Collections.Generic.IReadOnlyList1<string>,System.Collections.Generic.IReadOnlyList1) (at ./Library/PackageCache/[email protected]/Editor/AssetProcessors/DetectAssetChangeProcessor.cs:989)
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/[email protected]/Editor/AssetProcessors/DetectAssetChangeProcessor.cs:440)
WallstopStudios.UnityHelpers.Editor.AssetProcessors.DetectAssetChangeProcessor:ProcessPendingAssetChangesCore () (at ./Library/PackageCache/[email protected]/Editor/AssetProcessors/DetectAssetChangeProcessor.cs:397)
WallstopStudios.UnityHelpers.Editor.AssetProcessors.AssetPostprocessorDeferral:RunSafely (System.Action) (at ./Library/PackageCache/[email protected]/Editor/AssetProcessors/AssetPostprocessorDeferral.cs:234)
WallstopStudios.UnityHelpers.Editor.AssetProcessors.AssetPostprocessorDeferral:DrainPending () (at ./Library/PackageCache/[email protected]/Editor/AssetProcessors/AssetPostprocessorDeferral.cs:213)
WallstopStudios.UnityHelpers.Editor.AssetProcessors.AssetPostprocessorDeferral:DrainScheduled () (at ./Library/PackageCache/[email protected]/Editor/AssetProcessors/AssetPostprocessorDeferral.cs:186)
UnityEditor.EditorApplication:Internal_CallDelayFunctions ()

Steps to Reproduce

  1. Use an asset postprocessor
  2. Reload assets

Expected Behavior

All good

Actual Behavior

The above warning

Severity

Cosmetic (visual/UX issue)

Unity Version

Other

Package Version

3.5.0

Platform

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

Regression

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

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingtriage

    Type

    No type

    Fields

    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