You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
And having a material which is using a VisualShader, the editor UI for the material shader will not be clickable anymore. This is preventing the shader being opened via the sprites material property panel.
Steps to reproduce:
add a sprite to the scene.
add a new material to the sprite with a visual shader.
Add a uniform to the visual shader and use it somehow. (a color uniform for example)
also attach a new script with tool mode in which updates a material uniform in the process function.
Reopen the scene, so that the tool starts processing.
Try opening the Visual script via the sprite's property panels.
Minimal reproduction project:
The text was updated successfully, but these errors were encountered:
I apologize if this has already been fixed or a different use-case but I came looking for the same issue in godot 4 and apparently the issue was that I needed to rebuild the project and reload (close and open) the scene! Reopening is very important. I think that by default the editor is not tracking the script changes so you have to force reload it. I would actually file an issue for the particular problem..
Regardless, I am not sure if my problem is applicable, but here is the completely working editor-friendly shader update script in C# in godot 4.
[Tool]publicpartialclassGrid:Node2D{privateColorRect_colorRect;publicoverridevoid_Ready(){_colorRect=GetNode<ColorRect>("ColorRect");
UpdateShaderSize();
_colorRect.Connect(ColorRect.SignalName.Resized, Callable.From(_on_SizeChanged));}privatevoid_on_SizeChanged(){
UpdateShaderSize();}privatevoidUpdateShaderSize(){if(_colorRect.Material is ShaderMaterial shaderMaterial){
shaderMaterial.SetShaderParameter("node_size", _colorRect.Size);}}}
Godot version:
3.2.2 Beta 3 Official
OS/device including version:
Windows 10
Issue description:
Having a
sprite node
with a tool script attached to it:And having a material which is using a
VisualShader
, the editor UI for the material shader will not be clickable anymore. This is preventing the shader being opened via the sprites material property panel.Steps to reproduce:
add a sprite to the scene.
add a new material to the sprite with a visual shader.
Add a uniform to the visual shader and use it somehow. (a color uniform for example)
also attach a new script with tool mode in which updates a material uniform in the process function.
Reopen the scene, so that the tool starts processing.
Try opening the Visual script via the sprite's property panels.
Minimal reproduction project:
The text was updated successfully, but these errors were encountered: