Commit graph

1114 commits

Author SHA1 Message Date
Raul Santos
06c0a1abc9
C#: Avoid GodotSharp as project assembly name
The name GodotSharp conflicts with the name of the Godot assembly,
this causes the project assembly to be ignored.
2023-06-15 11:45:18 +02:00
RedworkDE
5766134610 [3.x] C#: Fix crash when errors occur before language initialization. 2023-02-28 23:01:24 +01:00
Hugo Locurcio
a93d651293
Mark C# editor settings to require a restart to be effective 2023-01-13 22:42:13 +01:00
Rémi Verschelde
1426cd3b3a
One Copyright Update to rule them all
As many open source projects have started doing it, we're removing the
current year from the copyright notice, so that we don't need to bump
it every year.

It seems like only the first year of publication is technically
relevant for copyright notices, and even that seems to be something
that many companies stopped listing altogether (in a version controlled
codebase, the commits are a much better source of date of publication
than a hardcoded copyright statement).

We also now list Godot Engine contributors first as we're collectively
the current maintainers of the project, and we clarify that the
"exclusive" copyright of the co-founders covers the timespan before
opensourcing (their further contributions are included as part of Godot
Engine contributors).

Also fixed "cf." Frenchism - it's meant as "refer to / see".

Backported from #70885.
2023-01-10 15:26:54 +01:00
Raul Santos
7106905a5b
C#: Deprecate string extensions that will be removed in 4.x
- Deprecated `Length` in favor of the `string.Length` property.
- Deprecated `Insert` in favor of the existing instance method with the same signature.
- Deprecated `Erase` in favor of `StringBuilder.Remove`.
- Deprecated `ToLower` and `ToUpper` in favor of the instance methods with the same signature.
- Deprecated `BeginsWith` in favor of `string.StartsWith`.
- Deprecated `EndsWith` in favor of the instance method with the same signature.
- Deprecated `Empty` in favor of `string.IsNullOrEmpty`.
- Deprecated `OrdAt` in favor of the `string[int]` indexer.
- Deprecated `LStrip` and `RStrip` in favor of `string.TrimStart` and `string.TrimEnd`.
2022-11-28 18:23:00 +01:00
dzil123
bdcb1ff228 [3.x] Fix c# Array.Shuffle incorrect mono bindings 2022-11-04 06:22:47 -07:00
Aaron Franke
fdce2a1dfc
[3.x] C#: Add Basis Euler angle code to match 4.x core 2022-09-30 17:20:36 -05:00
Hugo Locurcio
ed380cc0fa
Add a [kbd] tag for highlighting keyboard shortcuts in the editor help
This allows backporting documentation from the `master` branch more easily,
as it already features the `[kbd]` tag.

Co-authored-by: Yuri Sizov <11782833+YuriSizov@users.noreply.github.com>
2022-08-25 19:53:49 +02:00
Rémi Verschelde
67cc142002
Merge pull request #64460 from raulsntos/mono_assembly_name-3.x 2022-08-22 22:38:25 +02:00
Raul Santos
31d09a807e
C#: Use custom project setting for C# project files name
The setting is initially assigned the name of the Godot project,
but it's kept freezed to prevent issues when renaming the Godot
project.

The user can always rename the C# project and solution manually and
change the setting to the new name.

Co-authored-by: Ignacio Roldán Etcheverry <ignalfonsore@gmail.com>
2022-08-15 19:30:06 +02:00
Rémi Verschelde
8d71eadeca
Merge pull request #64018 from raulsntos/csharp-rpc-docs 2022-08-08 15:40:08 +02:00
Rémi Verschelde
519841bc0f
Merge pull request #64019 from raulsntos/csharp-docgen-3.x 2022-08-08 15:39:39 +02:00
Raul Santos
8f426262c8 Avoid paths with invalid characters in IsRider
(cherry picked from commit 34c3966510)
2022-08-08 10:52:14 +02:00
Raul Santos
c084dbbf05
Various fixes to C# documentation generator
- Fix references to global constants and members of `@GlobalScope`
- Log errors for missing members or methods
- Finds referenced members that are derived (they were not found before since it was only looking in the current type)
- Hardcodes special case for `_init` method, in C# replaced with a reference to the constructor
- Ignores properties with slashes (since they are not declared in C# and can't be referenced)
- Refactor `bbcode_to_xml` method
2022-08-06 21:35:31 +02:00
Raul Santos
c9734b6ceb
Document C# RPC attributes 2022-08-06 20:55:14 +02:00
Rémi Verschelde
14c9325b5d
Merge pull request #62408 from Razoric480/raz/fix-no-cache
[3.x] Fix nested resources being cached if no-cache argument used
2022-08-05 23:43:54 +02:00
Rémi Verschelde
1b7037807f
Merge pull request #59328 from raulsntos/csharp-flag-enums-3.x 2022-08-05 19:37:29 +02:00
Rémi Verschelde
0a8d5d7098 Bump version to 3.6-beta 2022-08-05 18:51:38 +02:00
Raul Santos
3ec6644096 C#: Remove unused Transform2D.ScaleBasis method
(cherry picked from commit a4ad1dfa51)
2022-08-03 15:01:02 +02:00
Raul Santos
ef9e2c8ca8 Rename math 'phi' arguments to 'angle' in C#
(cherry picked from commit d0e586fc7e)
2022-08-01 10:38:58 +02:00
bruvzg
12e10457e1 [macOS, Mono] Fix "Wdeprecated-declarations" build error.
(cherry picked from commit 5d54c015b2)
2022-08-01 10:30:43 +02:00
Aaron Franke
4d6c609e50
[3.x] Fix Translated method in C# affecting the original transform 2022-07-30 11:54:19 -05:00
Rémi Verschelde
818f1eed31 Code quality: Fix header guards consistency
Adds `header_guards.sh` bash script, used in CI to validate future
changes. Can be run locally to fix invalid header guards.
2022-07-25 14:53:37 +02:00
Francois Belair
2ceb93bbef Fix custom res caching sub-res even if no-cache
Fixes #59686, fixes #59752
2022-07-13 11:18:26 -04:00
Rémi Verschelde
06f4a28306 Update docs links still pointing to 3.4 2022-06-29 12:03:04 +02:00
Rémi Verschelde
83fae1dfa9 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 10:12:13 +02:00
iamjsk10
1b648ddc2b Mono: Fix typo to foreach C# keyword
(cherry picked from commit d3a839f4b1)
2022-06-20 14:55:34 +02:00
Rémi Verschelde
4137578369 Fix typos with codespell
Using codespell 2.2-dev from current git.

Fix a couple incorrect uses of gendered pronouns.
2022-06-19 13:48:15 +02:00
Paul Joannon
c43b8ccaaf Fix Lerp documentation and implement RangeLerp
(cherry picked from commit ee95a1cb28)
2022-06-16 20:47:40 +02:00
31
826415ad2f C#: Fix debugger options missing from Project Settings 2022-05-25 20:43:00 -07:00
Julian Mills
99e509a5d2 Fix blank command prompts spawning
prevent certain mono actions from displaying empty command prompts.

(cherry picked from commit d606a8eded)
2022-05-16 17:14:43 +02:00
Rémi Verschelde
9e37599f36 Core: Rename math 'phi' arguments to 'angle'
(cherry picked from commit e7a58a7eb6)
2022-05-05 15:02:46 +02:00
Haoyu Qiu
d088128b43 Remove duplicate editor settings definitions 2022-04-27 15:26:46 +08:00
Igor Kordiukiewicz
6bf7e8e010 String.Capitalize() in C# now matches the behaviour of String::capitalize() in C++
(cherry picked from commit 6c3b6664b5)
2022-04-13 11:43:49 +02:00
Raul Santos
3086d7c035
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.
2022-03-25 16:45:25 +01:00
Raul Santos
862691a9f7
Support explicit values in flag properties, add C# flags support
- Add support for explicit values in properties using `PROPERTY_HINT_FLAGS`
that works the same way it does for enums.
- Fix enums and flags in VisualScriptEditor (it wasn't considering the
explicit value).
- Use `PROPERTY_HINT_FLAGS` for C# enums with the FlagsAttribute instead
of `PROPERTY_HINT_ENUM`.
2022-03-19 19:22:54 +01:00
Densorius
ca432727d9
Fixed opening new instances of VS 2022 while a instance is already open
(cherry picked from commit 93e2d0446f)
2022-02-11 09:50:58 +01:00
Densorius
1afefea330
Add Visual Studio 2022 support with fallback to 2019
(cherry picked from commit 9ea0508d35)
2022-02-11 09:50:57 +01:00
Raul Santos
eddb99b9be 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.
2022-02-07 03:51:40 +01:00
Marcel Admiraal
c25365d5ff
Be more verbose about why msbuild tools could not be found
(cherry picked from commit 51834a4589)
2022-01-31 22:54:25 +01:00
Rémi Verschelde
0c6391a425
Merge pull request #57420 from neikeq/issue-55638 2022-01-31 18:23:08 +01:00
Ignacio Roldán Etcheverry
c7f716e2ea 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.
2022-01-29 21:58:57 +01:00
Raul Santos
d4790455ba
Fix marshaling values of generic Godot Dictionary
(cherry picked from commit e4c40efeab)
2022-01-19 14:04:22 +01:00
Ignacio Roldán Etcheverry
3b085e2665 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.
2022-01-16 12:36:36 +01:00
Rémi Verschelde
a627cdafc5
Update copyright statements to 2022
Happy new year to the wonderful Godot community!
2022-01-13 15:54:13 +01:00
Rémi Verschelde
b197de6f5f
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
```
2022-01-07 00:14:54 +01:00
Raul Santos
172f66a40e
Fix KeyValuePairAt memory leak
(cherry picked from commit 1fdfc379b6)
2022-01-06 00:21:36 +01:00
Max Hilbrunner
717801c9cb Fix docs links in 3.x after docs reorg 2022-01-05 11:54:52 +01:00
Rémi Verschelde
1e2ef49b77
Merge pull request #56391 from raulsntos/fix-56385 2022-01-05 10:44:54 +01:00
Zae
d5ad76a3c8 [3.x] [Mono] Add support for file-scoped namespace declaration. 2022-01-02 18:02:00 +08:00