Search Issue Tracker
Fixed in 5.4.0
[ComputeBuffer] Improve error messaging on ComputeBuffer constructor usage
Trying to create a new ComputeBuffer from code with
ComputeBuffer c = new ComputeBuffer (5, 5);
I get these errors printed to the Console:
"DestroyBuffer can only be called from the main thread.
Constructors and field initializers will be executed from the loading thread when loading a scene.
Don't use this function in the constructor or field initializers, instead move initialization code to the Awake or Start function."
None if this is very helpful and the documentation for ComputeBuffer doesn't give any details on this either.
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
- "Unknown managed type referenced" error is thrown on Play Mode enter with Profiler recording
- CapsuleCast from certain positions fails to detect a hit
- ShaderUtil.GetShaderData(shader).SubshaderCount does not count unsupported subshader
- GameObject.GetComponents returns the wrong number of components
- GUI button looks different from Editor in a Build