Search Issue Tracker
Won't Fix
Votes
0
Found in
2019.4
2020.3
2020.3.0f1
2021.1
2021.2
Issue ID
1326869
Regression
No
[macOS] "Metal: cannot write to unused constant buffer." error is thrown when using UnityEngine.GL inside OnSceneGUI
How to reproduce:
1. Open the attached project's "case_1326869-Project.zip" Scene labeled "Test"
2. In the Hierarchy, select the "Test" GameObject
3. In the Inspector, enter "8" under "Vertices Num" field
4. Click the "Init" button
5. Move the mouse over the Scene View
Expected result: No errors or warnings are thrown and a line is drawn
Actual result: Nothing is drawn and a "Metal: cannot write to unused constant buffer." error and "Metal: Vertex shader missing buffer binding at index 0" warning is thrown
Reproducible with: 2019.4.24f1, 2020.3.3f1, 2021.1.2f1, 2021.2.0a12
Couldn't test with: 2018.4.34f1 (Package dependencies break the project)
-
kimberlyjose
Apr 08, 2021 07:40
How to meet and marry the man of your dreams matchfinder.in/oriya-matrimony
-
doraamma40
Apr 07, 2021 17:35
absecuritysol.com/honeywell/conventional/sensors/
-
doraamma40
Apr 07, 2021 17:33
You have a way of writing compelling information that sparks much interest.
absecuritysol.com/honeywell/conventional/sensors/ -
doraamma40
Apr 07, 2021 17:32
You have a way of writing compelling information that sparks much interest.
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
- Articulation Body with 'Revolute' Joint Type has erratic behavior when Upper Limit is set to above 360
- WebGL Player fails to render Scene when Terrain with Detail Mesh is added and WebGPU Graphics API is used
- Inconsistent errors are logged when different types are passed into the Query "Q<>" method in UIToolkit and the ancestor VisualElement is null
- Crash on GetMaterialPropertyByIndex when opening a specific Scene
- Discrepancies in the styling are present when using a TSS file instead of a USS file in custom EditorWindow
Resolution Note (2021.2.X):
There is an error in the usage of GL class. As material is never set up, unity uses the last shader set, which, in case of scene view rendering, would be some builtin blit shader. The solution would be to setup the material, e.g.
private void OnSceneGUI()
{
if(mat == null)
{
Shader shader = Shader.Find("Hidden/Internal-Colored");
mat = new Material(shader);
mat.hideFlags = HideFlags.HideAndDontSave;
}
mat.SetPass(0);
<...>
i copied this directly from https://docs.unity3d.com/ScriptReference/Material.SetPass.html