Commit graph

1910 commits

Author SHA1 Message Date
Raul Santos
48e20c628a
C#: Set PropertyInfo.class_name for method parameters 2023-06-16 23:19:38 +02:00
Rémi Verschelde
7f5ef953b7
Merge pull request #78249 from RedworkDE/net-version-define
C#: Add version defines to help users deal with breaking changes
2023-06-15 15:26:31 +02:00
Rémi Verschelde
58416245ce
Merge pull request #78218 from raulsntos/dotnet/reserved-assembly-name
C#: Avoid GodotSharp as project assembly name
2023-06-15 15:26:22 +02:00
Rémi Verschelde
25b2f1780a
Style: Harmonize header includes in modules
This applies our existing style guide, and adds a new rule to that style
guide for modular components such as platform ports and modules:

Includes from the platform port or module ("local" includes) should be listed
first in their own block using relative paths, before Godot's "core" includes
which use "absolute" (project folder relative) paths, and finally thirdparty
includes.

Includes in `#ifdef`s come after their relevant section, i.e. the overall
structure is:

- Local includes
  * Conditional local includes
- Core includes
  * Conditional core includes
- Thirdparty includes
  * Conditional thirdparty includes
2023-06-15 14:35:45 +02:00
RedworkDE
1b466c6298 C#: Add version defines to help users deal with breaking changes 2023-06-15 13:18:04 +02:00
Raul Santos
7a031be769
C#: Avoid GodotSharp as project assembly name
The name GodotSharp conflicts with the name of the Godot assembly,
this causes a cyclic dependency.
2023-06-15 11:43:35 +02:00
RedworkDE
92f13ba9ea C#: Unify project name handling and fix issues with the handling of some special characters
Co-authored-by: Raul Santos <raulsntos@gmail.com>
2023-06-14 21:07:58 +02:00
Mikael Hermansson
1c1d1a1e2e Fix crash when using base types of extension-based types from C# 2023-06-12 18:29:52 +02:00
Rémi Verschelde
5047892939
Merge pull request #73939 from raulsntos/dotnet/export-symbols
C#: Add option to disable exporting debug symbols
2023-06-09 12:14:15 +02:00
Rémi Verschelde
aa5dfff3f0
Merge pull request #77410 from dsnopek/object-pointer-pointer-encoding
Standardize Object ptrcall encoding on `Object **`
2023-06-07 13:31:49 +02:00
RedworkDE
e0efa3c357 C#: Always decode dotnet output as UTF-8 2023-06-07 10:58:34 +02:00
Rémi Verschelde
0a0132ccf4
Merge pull request #77904 from raulsntos/dotnet/obsolete-deprecated-members
C#: Add `[Obsolete]` attribute to deprecated members
2023-06-06 20:40:09 +02:00
Rémi Verschelde
e2fcc4de34
Merge pull request #75188 from RedworkDE/net-synchronize-insert
C#: Synchronize adding ScriptInstances
2023-06-06 20:39:16 +02:00
Raul Santos
0484993121
C#: Add [Obsolete] attribute to deprecated members 2023-06-06 12:23:23 +02:00
VolTer
119456304b Reduce the total size of our SVGs by 15% 2023-06-04 15:11:48 +02:00
Raul Santos
0aa1f3440e
C#: Add option to disable exporting debug symbols
- Add export option to configure if the exported game should include debug symbols (PDB).
- Remove unused `outputDir` local variable.
- Replace `Process.GetCurrentProcess().Id` with `System.Environment.ProcessId` (CA1837).
2023-06-02 16:37:59 +02:00
Yuri Sizov
f00641af9d
Merge pull request #77657 from vmedea/color-hex-doc
Clarify doc for Color.hex
2023-05-30 15:59:39 +02:00
mara
779ac20bb9 Clarify doc for Color.hex and C# Color()
The "alpha channel first" seems misleading to me. It doesn't match with
the examples, so remove it. Add a more detailed specification of the
expected number format in hex.
2023-05-30 15:15:04 +02:00
Raul Santos
a1f454fee3
C#: Add global class support
Co-authored-by: willnationsdev <willnationsdev@gmail.com>
2023-05-29 19:04:02 +02:00
David Snopek
77733faede Attempt to standardize Object ptrcall encoding on Object ** 2023-05-25 21:46:22 -05:00
RedworkDE
fa14b6d212 C#: Fix SendToScriptDebugger crash 2023-05-23 00:00:32 +02:00
RedworkDE
8fdebb85ef C#: Synchronize adding ScriptInstances 2023-05-22 21:40:14 +02:00
Rémi Verschelde
4fd64edc30
Merge pull request #77199 from RedworkDE/net-callable-hash
C#: Mostly fix hash of ManagedCallable
2023-05-22 13:48:58 +02:00
Yuri Sizov
156a2fabea
Merge pull request #76659 from shana/shana/75152-fix-crash-when-initializing-glue-generation
Skip initializing the C# runtime when generating glue bindings
2023-05-19 17:10:40 +02:00
Andreia Gaita
e56fdc8a9a Skip initializing the C# runtime when generating glue bindings
The bindings generator doesn't require the C# runtime in order to generate
the glue, and when it the glue generation runs, it exits immediately
afterwards, so we can skip this initialization when the `--generate-mono-glue`
flag is passed in.

Fixes issue 75152
2023-05-18 13:57:42 +02:00
RedworkDE
1cfc382fe8 C#: Mostly fix hash of ManagedCallable
The hash can still change when reloading assemblies but in all other
cases the result should be correct.
2023-05-18 13:44:36 +02:00
Paul Joannon
178cd046bb
Link the right build property to REAL_T_IS_DOUBLE 2023-05-18 13:37:34 +02:00
Rémi Verschelde
c64afeb017
Merge pull request #77018 from RedworkDE/net-glue-neg-enum
Fix C# glue generation for enums with negative values
2023-05-12 23:27:07 +02:00
Rémi Verschelde
f26a2dbb1b
Merge pull request #75662 from goncalo/basis_looking_at
C#: Add Basis.LookingAt
2023-05-12 23:25:52 +02:00
RedworkDE
45659ce2d9 Fix C# glue generation for enums with negative values 2023-05-12 21:53:42 +02:00
Rémi Verschelde
8f17f26233
Merge pull request #76978 from raulsntos/property-hint-compat
Reorder `PropertyHint` enum to avoid breaking compat
2023-05-12 10:06:32 +02:00
Raul Santos
a34207b812
Reorder PropertyHint enum to avoid breaking compat
Also syncs the Core enum with the C# enum for the source generators.
2023-05-12 01:48:07 +02:00
clayjohn
f83a90192f Revert "Add API for HSL conversion"
This reverts commit 0b7fd664c1.
2023-05-10 17:45:56 -03:00
Rémi Verschelde
0f444f101a
Merge pull request #76661 from bonjorno7/hsl
Add API for HSL conversion
2023-05-09 19:28:35 +02:00
bonjorno7
0b7fd664c1 Add API for HSL conversion
Math ported pretty much 1:1 from https://en.wikipedia.org/wiki/HSL_and_HSV
Style doesn't match the existing HSV code exactly, but should be close enough.
2023-05-09 17:43:10 +02:00
Clay John
610877e326
Merge pull request #72288 from MewPurPur/use-string-repeat
Use `String.repeat()` to optimize several String methods
2023-05-05 09:56:48 -07:00
VolTer
6b84e258d2 Use String.repeat() in more places 2023-05-01 02:27:46 +02:00
Rémi Verschelde
8f7b09916d
Merge pull request #76026 from YuriSizov/editor-running-up-that-gui
Extract editor run toolbar into its own component
2023-04-26 12:15:29 +02:00
RedworkDE
692ad70fd7 C#: Do not use DocCache when generating glue code 2023-04-20 15:35:14 +02:00
Yuri Sizov
8a74d8438f Extract editor run toolbar into its own component
- Simplify and update its logic.
- Simplify EditorScript.
- Improve EditorNode and other relevant includes.
- Fix scene-based path in the movie writer when
reloading a scene.
2023-04-19 17:12:28 +02:00
RedworkDE
34b4128004 C#: Make include scripts contents an export option 2023-04-18 14:27:15 +02:00
Kevin Simpson
c2b97ec1f7 Add the ability to set a custom C# editor
This allows users to still use the built-in Godot editor for GDScript.
2023-04-18 13:55:08 +02:00
Gonçalo Vasconcelos
b74d4f45bb C#: Add Basis.LookingAt 2023-04-11 16:05:35 +01:00
RedworkDE
27124ed8e5 C#: Discontinue GodotNuGetFallbackFolder 2023-04-07 19:22:43 +02:00
bendn
ca0feabbb0
add hex_decode() to String 2023-04-05 19:44:00 +07:00
Yuri Sizov
ce03630f34
Merge pull request #75477 from kleonc/csharp-fix-vector234i-from-floats-creation
C# Truncate instead of round in Vector2/3/4 to Vector2I/3I/4I conversion
2023-03-31 13:01:48 +02:00
Yuri Sizov
8f6ce4c8f9
Merge pull request #71049 from alexdlm/dotnet-generator-selective-disable
Add fine-grained disabling of SourceGenerators
2023-03-31 12:56:03 +02:00
kleonc
f53d3382af C# Truncate instead of round in Vector2/3/4 to Vector2I/3I/4I conversion 2023-03-31 10:59:11 +02:00
Redwarx008
eb1fb254a6 C#: Fix Array.AddRange index out of bounds
Fix Array.AddRange index out of bounds
2023-03-27 21:55:06 +08:00
Yuri Sizov
7ef4ada3a6
Merge pull request #75286 from AThousandShips/csharp_shadow
Fix "hides member" warnings in `csharp_script.cpp`
2023-03-25 16:15:25 +01:00