Search Issue Tracker
Won't Fix
Votes
0
Found in
5.6.0f3
Issue ID
902776
Regression
No
Creating Materials during OnRenderObject introduces asset database inconsistencies
When creating materials using OnRenderObject() function it creates two materials. Deleting them resolves in Unity crash.
To reproduce:
1.Open users attached project
2.Open "Repro.unity" scene
3.Delete "BuggedMaterial" from Assets > Resources
4.Press Assets > Reimport All
5.Enter play mode
6.Press cancel for both errors
7.Ignore the last "Inconsistency Detected" error
8.Observe as two materials are created
9.Delete freshly created materials
Expected result: materials are deleted
Actual result: Unity crashes
Reproduced on: 5.5.2p2 5.6.0f3 5.6.0p2 2017.1.0b1
Notes: Using Update() or Start() functions, it creates only one material an deleting it does no crash Unity. Entering play mode with Unity 5.4.3f1, Unity crashes instantly
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- “Remove Unused Overrides” available on not loaded Scene and throws “ArgumentException: The scene is not loaded” warning
- Adaptive Probe Volume occlusion edge is calculated incorrectly when viewing probes near geometry edges
- Sampling a texture using an HLSL file throws shader errors and the code does not compile
- "Graphics.CopyTexture called with null source texture" error when Base Camera of an Overlay Camera is removed with DX11 Graphics API and Compatibility Mode enabled
- WebGL sends wrong value with large numbers when SendMessage function is used
Resolution Note (2019.1.X):
Hi there,
We really appreciate your contribution to the Unity product. Thank you for reporting this issue. We take every case submitted to us seriously by investigating the impact on you, our customer, as well as the impact it may have on the engineering and experience of our product.
This particular case has been investigated thoroughly and we have decided, in the interests of protecting the stability and features of Unity for users that rely upon the affected versions, to not address this fix for the time being. We understand that this will cause problems for some users, and so may address in a future version.
Unity QA Team