-
-
Notifications
You must be signed in to change notification settings - Fork 21.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0ba1046
commit ff475a1
Showing
7 changed files
with
147 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
modules/mono/glue/GodotSharp/GodotSharp/Core/Attributes/GlobalAttribute.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
using System; | ||
|
||
namespace Godot | ||
{ | ||
/// <summary> | ||
/// Exposes the target class as a global script class to Godot Engine. | ||
/// </summary> | ||
[AttributeUsage(AttributeTargets.Class)] | ||
public class GlobalAttribute : Attribute | ||
{ | ||
private string name; | ||
private string iconPath; | ||
|
||
/// <summary> | ||
/// Constructs a new GlobalAttribute Instance. | ||
/// </summary> | ||
/// <param name="name">The name under which to register the targeted class. Uses its typename by default.</param> | ||
/// <param name="iconPath">An optional file path to a custom icon for representing this class in the Godot Editor.</param> | ||
public GlobalAttribute(string name = "", string iconPath = "") | ||
{ | ||
this.name = name ?? ""; | ||
this.iconPath = iconPath ?? ""; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters