For some reason can't hear the music in Godot engine

32 Views Asked by At

Here's the C# code for the music part. For some reason I cannot hear the music. The path to the file is correct.

public override void _Ready()
{
    var streamPlayer = GetNode<AudioStreamPlayer2D>("AudioStreamPlayer2D");
    streamPlayer.Stream = GD.Load<AudioStream>("res://music.mp3");
    streamPlayer.Play();
}

There's no error, just no music sounds. Here are the errors:Error messages

0

There are 0 best solutions below