Commit Graph

1066 Commits

Author SHA1 Message Date
Aaron Franke 60d34604d5 [3.x] Fix Translated method in C# affecting the original transform
(cherry picked from commit 4d6c609e50)
2022-08-01 10:54:44 +02:00
bruvzg 3151ebbd68 [macOS, Mono] Fix "Wdeprecated-declarations" build error.
(cherry picked from commit 5d54c015b2)
2022-08-01 10:53:18 +02:00
31 8cb4593eed C#: Fix debugger options missing from Project Settings
(cherry picked from commit 826415ad2f)
2022-07-07 14:09:21 +02:00
Rémi Verschelde 0328664bb5 Mono: Update Newtonsoft.Json to 13.0.1
See https://github.com/advisories/GHSA-5crp-9r3c-p9vr

(cherry picked from commit 870c02143b)
2022-06-24 11:19:38 +02:00
Rémi Verschelde afe8492241 Fix typos with codespell
Using codespell 2.2-dev from current git.

Fix a couple incorrect uses of gendered pronouns.
2022-06-19 14:06:55 +02:00
Raul Santos 3a16557642 Avoid modifying csproj globbing includes on remove
Check if the found globbing include already matches the given path on
removing scripts to avoid modifying users' csproj files.

(cherry picked from commit 3086d7c035)
2022-04-13 12:18:44 +02:00
Densorius fd850ace8a
Fixed opening new instances of VS 2022 while a instance is already open
(cherry picked from commit 93e2d0446f)
2022-02-17 10:32:00 +01:00
Densorius a357557282
Add Visual Studio 2022 support with fallback to 2019
(cherry picked from commit 9ea0508d35)
2022-02-17 10:31:41 +01:00
Raul Santos e9f93155c6
Attach mono thread before getting nativeName field
In order to access the `nativeName` constant field from a C# class, the
mono scope thread must be attached or the mono domain will be null.

(cherry picked from commit eddb99b9be)
2022-02-17 10:23:15 +01:00
Ignacio Roldán Etcheverry 6d5f8cd3ca
Mono/C#: Fix Android AAB export failing to load native libs
By default, when installing from Android App Bundles the native
libraries are not extracted. They are loaded directly from the APK.
See: https://stackoverflow.com/a/56551499

Passing only the file name to dlopen, without the location, makes it
search the native library in all locations, including inside the apk.

(cherry picked from commit c7f716e2ea)
2022-01-31 20:39:31 +01:00
Raul Santos 51bcfd53b4
Fix marshaling values of generic Godot Dictionary
(cherry picked from commit e4c40efeab)
2022-01-25 18:42:08 +01:00
Ignacio Roldán Etcheverry cd016ea0b1
C#: Allow configuring Mono debugger agent with cmdline args
The command line option is the same you would pass to Mono, but it
begins with `--mono-debugger-agent=` instead of `--debugger-agent=`.

This is useful for platforms where it's difficult for the user to
configure it via environment variables, like Android.

(cherry picked from commit 3b085e2665)
2022-01-25 18:40:19 +01:00
Rémi Verschelde 71066cd63b
Update copyright statements to 2022
Happy new year to the wonderful Godot community!

(cherry picked from commit a627cdafc5)
2022-01-13 16:00:37 +01:00
Rémi Verschelde 2e8fdd0112
Fix typos with codespell
Using codespell 2.1.0.

Method:
```
$ cat > ../godot-word-whitelist.txt << EOF
ang
curvelinear
dof
doubleclick
fave
findn
GIRD
leapyear
lod
merchantibility
nd
numer
ois
ony
que
readded
seeked
statics
synching
te
uint
unselect
webp
EOF

$ codespell -w -q 3 -I ../godot-word-whitelist.txt --skip="./thirdparty,*.po"
$ git diff // undo unwanted changes
```

(cherry picked from commit b197de6f5f)
2022-01-07 00:17:47 +01:00
Max Hilbrunner 2927494d7e
Fix docs links in 3.x after docs reorg
(cherry picked from commit 717801c9cb)
2022-01-06 00:58:32 +01:00
Raul Santos 99353a2aee
Fix getting properties state when reloading C#
When reloading C# classes and keep their properties values they are
retrieved and stored in a state list.
Retrieving the properties was only getting the fields of the C# class
and not inherited fields so those properties values were lost on reload.
Now we also try to find the field in the parent classes.

(cherry picked from commit 907e709f9d)
2022-01-06 00:58:31 +01:00
Raul Santos b096c4b05f
Fix `KeyValuePairAt` memory leak
(cherry picked from commit 1fdfc379b6)
2022-01-06 00:58:30 +01:00
Raul Santos 9520c6b953
Check a csproj exists before trying to edit it
When folders are moved/removed from the file system, the `.csproj`
may need to be edited to update the path of C# scripts or remove them.
If a C# solution has not been created, the `.csproj` file does not exist
and therefore there is no need to edit it.

(cherry picked from commit cf98ff248a)
2021-12-21 12:23:19 +01:00
Ignacio Roldán Etcheverry b63f1fc603
C#: Don't use ActivityThread to determine Android nativeLibraryDir
(cherry picked from commit 690bf12c4c)
2021-11-15 22:27:38 +01:00
Raul Santos 21f68e7bdb
Ensure C# script properties are added to the end
Ensures that the `get_property_list` and `get_script_property_list`
methods push the script properties to the end of the given list, this
prevents the script property from appearing after the script variables.
2021-10-30 16:55:21 +02:00
Rémi Verschelde 14ef65e49b
Merge pull request #54348 from akien-mga/3.x-clang-format-dont-align-operands 2021-10-28 15:43:15 +02:00
Rémi Verschelde 87c80f529f
clang-format: Enable `BreakBeforeTernaryOperators`
clang-format keeps breaking the way it handles break *after* ternary operators,
so I give up and go with the only style they seem to actually test.
2021-10-28 14:50:33 +02:00
Rémi Verschelde 42d385b312
clang-format: Disable alignment of operands, too unreliable
Sets `AlignOperands` to `DontAlign`.

`clang-format` developers seem to mostly care about space-based indentation and
every other version of clang-format breaks the bad mismatch of tabs and spaces
that it seems to use for operand alignment. So it's better without, so that it
respects our two-tabs `ContinuationIndentWidth`.
2021-10-28 13:23:38 +02:00
Raul Santos ced4f3519d Avoid modifying csproj globbing includes
Check if the found globbing include already matches the new path on
moving scripts to avoid modifying users' csproj files.
2021-10-26 18:21:19 +02:00
Raul Santos da419bbeed Keep order for C# exported members 2021-10-24 21:14:20 +02:00
Aaron Franke 5659120af3
[3.x] Add support for the RISC-V architecture
Supports RV64GC (RISC-V 64-bit with general-purpose and compressed-instruction extensions)
2021-10-22 12:51:23 -05:00
Rémi Verschelde fddbbf445b
SCons: Fix missing mono `.gen.cpp` sources after #53860
(cherry picked from commit d6aab5c1bf)
2021-10-16 16:47:08 +02:00
Raul Santos 977898709f Fix hint_string for C# enum arrays 2021-10-15 19:07:31 +02:00
Rémi Verschelde f04a1bec63
Merge pull request #53628 from raulsntos/fix-list-marshal-3.x 2021-10-15 17:36:00 +02:00
Rémi Verschelde b8761569f6
Merge pull request #53582 from raulsntos/mono-marshal-generics-3.x 2021-10-15 17:35:32 +02:00
Raul Santos 059750cd0d Support marshaling generic Godot.Object
Allows using generic C# types in signals as long as they inherit
from `Godot.Object`.
2021-10-13 18:22:06 +02:00
Raul Santos fd160b642e Fix C# List<T> marshalling 2021-10-10 11:41:37 +02:00
Raul Santos ec2f86ec9a Support arrays of StringName, NodePath and RID in mono 2021-10-08 18:52:40 +02:00
Rémi Verschelde db0370cab5
Merge pull request #51086 from aaronfranke/3.x-warn-dectime 2021-10-05 12:06:03 +02:00
Rémi Verschelde d01c660954
Merge pull request #52964 from Pineapple/WIN32_LEAN_AND_MEAN 2021-10-05 12:03:52 +02:00
Rémi Verschelde 6e39566344
Merge pull request #52883 from Germanrc/script_reload_fix
C# scripts reload in editor fixed
2021-09-24 08:33:49 +02:00
Bartłomiej T. Listwon f463e612a1 Add missing WIN32_LEAN_AND_MEAN 2021-09-23 10:36:31 +02:00
Germanrc 84a218d346 C# script reload fixed
Co-authored-by: Michael Bickel <mib@developium.net>
2021-09-21 23:03:45 +02:00
Aaron Franke a5543bc35e
[3.x] Warn when using the dectime method
dectime has been removed in the master branch (what will be Godot 4.0)
2021-09-21 10:03:42 -05:00
Rémi Verschelde b37776fa2f
Merge pull request #52591 from timothyqiu/error-macros
[3.x] Remove do{ } while(0) wrapper around error macros
2021-09-21 10:38:34 +02:00
Hugo Locurcio 59eafe4cd3
Remove `#ifdefs` for handling compilation with Visual Studio < 2015
Godot 3.3 and later require Visual Studio 2017 to be compiled.

(cherry picked from commit fc0bfbb33b)
2021-09-19 11:30:22 +02:00
Aaron Franke 298e29c772
[3.x] Some more C# formatting and style fixes 2021-09-18 12:11:03 -05:00
Rémi Verschelde bb2772d2f2
Merge pull request #52762 from magian1127/3.xTemp1 2021-09-18 14:51:07 +02:00
Magian 0263a87c8b C#, replace the current Xform method with a * operator. 2021-09-18 20:40:08 +08:00
Rémi Verschelde 316b5dad2d
Merge pull request #52390 from raulsntos/csharp-docs-3.x
[3.x] Add documentation to GodotSharp
2021-09-18 01:00:03 +02:00
Rémi Verschelde 4b50cd9b56
Merge pull request #52763 from magian1127/3.xtemp2 2021-09-17 12:26:36 +02:00
Magian 58e742e2c0 C# Array<String> Export Support Enum(String) 2021-09-17 14:03:27 +08:00
Rémi Verschelde ae58f94323
Merge pull request #52445 from nekomatata/fix-mono-nodepath-default-arg-3.x 2021-09-16 15:20:17 +02:00
Rémi Verschelde 154cca3d5d
Merge pull request #52595 from lewiji/mono-build-solution-shortcut
[3.x] Add editor keyboard shortcut for Mono Build solution button
2021-09-14 16:00:10 +02:00
Lewis James 48a6264a87 Add editor keyboard shortcut for Mono Build solution button
Update GodotSharpEditor.cs & csharp_script.cpp with better casing and localisation for HintTooltip on Build button

Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
2021-09-14 13:24:03 +01:00