Validate ShaderPrototype IDs (#38728)
* Convert all shader prototype string literals to protoids in overlays * Convert more shader prototype literal strings to protoids * Convert ValidatePrototypeId to ProtoId * Later
This commit is contained in:
@@ -262,6 +262,7 @@ public sealed partial class ParticleAcceleratorControlMenu : FancyWindow
|
||||
|
||||
public sealed class PASegmentControl : Control
|
||||
{
|
||||
private static readonly ProtoId<ShaderPrototype> GreyscaleShaderId = "Greyscale";
|
||||
private readonly ShaderInstance _greyScaleShader;
|
||||
private readonly TextureRect _base;
|
||||
private readonly TextureRect _unlit;
|
||||
@@ -272,7 +273,7 @@ public sealed class PASegmentControl : Control
|
||||
|
||||
public PASegmentControl()
|
||||
{
|
||||
_greyScaleShader = IoCManager.Resolve<IPrototypeManager>().Index<ShaderPrototype>("Greyscale").Instance();
|
||||
_greyScaleShader = IoCManager.Resolve<IPrototypeManager>().Index(GreyscaleShaderId).Instance();
|
||||
|
||||
AddChild(_base = new TextureRect());
|
||||
AddChild(_unlit = new TextureRect());
|
||||
|
||||
Reference in New Issue
Block a user