0
Answered

Can you fix the few unity warnings?

o greil 6 years ago updated 6 years ago 4

Hey there - I am getting a few warnings in Unity from your Shader Weaver code (... is assigned/declared but never used...)- is it possible to fix them with the next release?

Thanks a lot,

Oliver

Answer

Answer

Except the 'SetupShaderMenu' one, all the rest warnings are removed in the next version.
Hope this will make you feel good : )


Answered

Shader Weaver is using them to check texture settings. Currently it is needed. And it is just editor warnings, which will not affect your game or the builds at all.

Please ignore it, thank you!

Hey there - I was just checking those 5-6 warnings - but they seem to have no use and are just variables which are nowhere used - so if you would remove them - the errors would be gone :) I love to have clean code without warnings - that's all.

Assets/ShaderWeaver/Plugin/Scripts/Editor/Node/SWNodeBase.cs(378,26): warning CS0168: The variable `e' is declared but never used
Assets/ShaderWeaver/Plugin/Scripts/Editor/Node/SWNodeCode.cs(126,27): warning CS0168: The variable `e' is declared but never used
Assets/ShaderWeaver/Plugin/Scripts/Editor/Window/SWWindowEffect.cs(996,10): warning CS0168: The variable `temp' is declared but never used
Assets/ShaderWeaver/Plugin/Scripts/Editor/Window/SWWindowLayoutV.cs(958,10): warning CS0219: The variable `yOff' is assigned but its value is never used
Assets/ShaderWeaver/Plugin/Scripts/Editor/Window/SWWindowMainRight.cs(59,27): warning CS0168: The variable `e' is declared but never used
Assets/ShaderWeaver/Plugin/Scripts/Editor/Window/SWWindowMainRight.cs(254,48): warning CS0618: `UnityEditorInternal.InternalEditorUtility.SetupShaderMenu(UnityEngine.Material)' is obsolete: `SetupShaderMenu is obsolete. You can get list of available shaders with ShaderUtil.GetAllShaderInfos'


One error is obsolete warning - not sure about this one.


Thanks a lot,

Oliver

Answer

Except the 'SetupShaderMenu' one, all the rest warnings are removed in the next version.
Hope this will make you feel good : )


Haha thanks :) Well yeah I am used to have a totally clean environment and I know its just a "warning" and nothing important - but I always remove those error for myself so its nice if I don't have to do this after every new release :)

Thanks a lot and much appreciated ^^