Godot Version
4.2
Question
I am following a tutorial on how to make lasers in godot and the tutorial is in GDScript. But I am trying to convert the code to C#.
public async void Activate(float time)
{
tween = GetTree().CreateTween();
Visible = true;
beamParticles.Emitting = true;
endParticles.Emitting = true;
tween.SetParallel(true);
tween.TweenProperty(mesh, “TopRadius”, beamRadius, time);
tween.TweenProperty(mesh, “BottomRadius”, beamRadius, time);
tween.TweenProperty(beamProcessMaterial, “ScaleMin”, 1, time);
tween.TweenProperty(endBeamProcessMaterial, “ScaleMin”, 1, time);
await tween.Finished;
}
With this piece of code I get an error called this:
The event ‘Tween.Finished’ can only appear on the left hand side of += or -= CS0079
I have made research on how to solve this and I looked at the godot and C# documentation for help but it was all in vain. Any help is appreciated. Thank you in advance.