1bit-game-jam/scripts/PointLight2DWorkaround.cs

19 lines
394 B
C#

using Godot;
using System;
/// <summary>
/// https://github.com/godotengine/godot/issues/75868#issuecomment-1524362054 THANK YOU!!!
/// </summary>
[Tool]
public partial class PointLight2DWorkaround : PointLight2D
{
[Export] public Viewport LightViewport;
public override void _Process(double delta)
{
base._Process(delta);
Texture = null;
Texture = LightViewport.GetTexture();
}
}