Search Issue Tracker
Warning appears when changing MeshFilter.sharedMesh during OnValidate()
1. Open project attached (TerrainEngine.zip).
2. Open scene "testscene".
3. Select object "Terrain".
4. Change UTerrain script parameters, for example size.
Expected result: Once size is changed OnValidate function will work fine.
Actual result: Error appears: "SendMessage cannot be called during Awake, CheckConsistency, or OnValidate"
Note: There is a code that is called during OnValidate:
Mesh terrainMesh = new Mesh();
meshFilter.sharedMesh = terrainMesh;
Reproduced on: 2017.1.0a2, 2017.1.0b9, 2017.2.0a3.
Works fine on: 5.5.0f3, 5.6.1f1, 5.6.1p4.
Regression introduced in 2017.1.
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
- [2D Game kit] "Import parameters got modified during import" error is thrown when opening up the project for the first time
- Building subscenes without platform package doesn't work
- Picking stacked objects always selects prefab
- Crash on DebugStringToFilePostprocessedStacktrace when loading/unloading scenes on GetLightmapSettings() returning null pointer
- [macOS]Hinge Joint with Mesh Collider causes a crash on a specific project