Skip to content

Commit

Permalink
closes dialogic-godot#657 build error for DialogSharp.cs
Browse files Browse the repository at this point in the history
When building a Godot Mono 3.4 project using the library a build error
occurs:

`\addons\dialogic\Other\DialogicSharp.cs(16,102): Optional parameters
must appear after all required parameters`

Made set a default parameter for `dialogScenePath` so that ordering
rules for C# are respected and the library builds when used in a
project.

See C# documentation for more details:

https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/classes-and-structs/named-and-optional-arguments
  • Loading branch information
sesopenko committed Nov 30, 2021
1 parent 10c14d1 commit fceb20f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion addons/dialogic/Other/DialogicSharp.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public static Node Start(String timeline = "", String default_timeline = "", boo
return Start<Node>(timeline, default_timeline, DEFAULT_DIALOG_RESOURCE, useCanvasInstead);
}

public static T Start<T>(String timeline = "", String default_timeline = "", String dialogScenePath, bool useCanvasInstead = true) where T : class
public static T Start<T>(String timeline = "", String default_timeline = "", String dialogScenePath = "", bool useCanvasInstead = true) where T : class
{
return (T)_dialogic.Call("start", timeline, default_timeline, dialogScenePath, useCanvasInstead);
}
Expand Down

0 comments on commit fceb20f

Please sign in to comment.