Commit Graph

56 Commits

Author SHA1 Message Date
=
64bcefb7cd Mono: Fixes annotated signal loading in exported binaries
(cherry picked from commit 489c9adf03)
2018-07-08 15:39:15 +02:00
9945da3efc Mono: Improve 'script class not found' error
No longer printed when using using placeholder script instances (for non-tool scripts in the editor).
Print different error if the project assembly is not loaded

(cherry picked from commit c8945fe7d8)
2018-06-01 18:04:12 +02:00
58918b629d Mono: Do not spam script class not found error
Print this error only when trying to instantiate the script. This way we prevent errors being printed for source files which are not meant to be used as scripts.

(cherry picked from commit f8ce412560)
2018-04-28 22:59:25 +02:00
736d8db007 Mono: Fix crash on script load if the scripts domain isn't loaded
(cherry picked from commit 89e84185e8)
2018-04-28 22:59:11 +02:00
6472d8c7d4 Mono: Avoid invalid class names.
Disallow reserved keywords as class names and prefix base class with the Godot
namespace if it's the same as the class name.

Fixes #12483

(cherry picked from commit 700d07cf7c)
2018-04-15 00:48:11 +02:00
9e4d34aebb Mono: Add project export plugin
(cherry picked from commit 9fd606c549)
2018-04-15 00:04:14 +02:00
990bddcf36 fix release builds with mono
"_signals" and "signals_invalidated" were moved out of the
"TOOLS_ENABLED" directive. Updated also the two "update_signals" and
"_update_signals" methods so it makes sense.

(cherry picked from commit 3c7d9001bc)
2018-02-27 11:34:52 +01:00
dde14e15c6 Mono: Better versioning and gracefully unloading of Godot API assemblies
(cherry picked from commit f37090ccf4)
2018-02-26 22:36:03 +01:00
9cba5ef772 implement signal related methods in csharp_script so signals can be used with emit
(cherry picked from commit cfbd7fd21e)
2018-02-19 22:39:51 +01:00
416cd9c8b8 add a [Signal] attribute to CSharpScripts
(cherry picked from commit efd52cd172)
2018-02-19 22:39:44 +01:00
3f6e8d70cf Added async and await as C# keywords.
(cherry picked from commit 3dcf0567a1)
2018-02-05 09:33:01 +01:00
40c779fb70 Mono: Remove automatic script multilevel calls
(cherry picked from commit 84437b4864)
2018-02-05 09:32:29 +01:00
0c3bbcaa00 Mono: Fix build errors with tools=no and target=release 2018-01-27 18:44:04 +01:00
e1ae7dffd3 Merge pull request #16016 from neikeq/issue-13316
Fix CSharpInstance::call not initializing CallError
2018-01-24 01:35:10 +01:00
8c33939ce6 Fix CSharpInstance::call not initializing CallError 2018-01-24 01:31:51 +01:00
1de5f7e70b fix marshalling when a function is returning an object from c# 2018-01-18 10:31:36 +01:00
bff9627dc4 Mono: Some StackTrace to StackInfo[] fixes
- Sometimes `StackFrame.GetMethod()` returns null (e.g.: latest frame of a `MissingMethodException`). Still not sure what to do with that frame (maybe skip it), but at least it no longer fails.
- Skip `CSharpLanguage::debug_get_current_stack_info()` if an error is printed from `GDMonoUtils::update_corlib_cache()`.
- Fix crash when calling `GDMonoUtils::print_unhandled_exception(exc)` if there is no ScriptDebugger attached.
2018-01-12 19:31:15 +01:00
9b8e8b2220 Bind many more properties to scripts
Notable potentially breaking changes:
- PROPERTY_USAGE_NOEDITOR is now PROPERTY_USAGE_STORAGE | PROPERTY_USAGE_NETWORK, without PROPERTY_USAGE_INTERNAL
- Some properties were renamed, and sometimes even shadowed by new ones
- New getter methods (some virtual) were added
2018-01-12 00:58:14 +02:00
f7de51b3a6 Mono: Some fixes for #15463 2018-01-09 22:27:55 +01:00
5be356b72f Mono: Implement stack info for errors and exceptions 2018-01-09 17:19:03 +01:00
e4213e66b2 Add missing copyright headers and fix formatting
Using `misc/scripts/fix_headers.py` on all Godot files.
Some missing header guards were added, and the header inclusion order
was fixed in the Bullet module.
2018-01-05 01:22:23 +01:00
119a910bc6 Mono: Add properties support in scripts 2018-01-04 21:16:22 +01:00
b50a9114b1 Update copyright statements to 2018
Happy new year to the wonderful Godot community!
2018-01-01 14:40:47 +01:00
fe391393d4 Mono: Change BindingsGenerator singleton to avoid StringName leaks 2018-01-01 03:05:19 +01:00
b271aa48e4 Mono: Script lifetime fixes
- alloc_language_binding: Use strong GC handle as well for references. Fixes #15138
- Set the native instance field of Godot.Object to IntPtr.Zero when it's freed.
- Create weak handles without tracking resurrection (that was causing trouble). This means we have to call notification predelete before queueing a native Object for deletion, and use the MonoObject* passed by the finalizer because the weak GC handle target will return NULL at this point.
2018-01-01 03:05:13 +01:00
0a0a44da8d Mono: Make the bindings generator output enums
- Switch to PascalCase for constants names
2017-12-24 04:20:41 +01:00
13c2ff9320 Style: Apply new clang-format 5.0 style to all files 2017-12-07 08:02:00 +01:00
0c22447ebe Exported variables now show in the correct order. 2017-12-02 21:01:58 -05:00
d28763a4c1 Rename Rect3 to AABB.
Fixes #12973.
2017-11-17 11:01:41 -05:00
3c97a9543d Merge pull request #12549 from neikeq/seriously-do-they
Mono cleanup fixes
2017-11-01 01:56:16 +01:00
06ea441564 Make sure gchandle bindings are released before cleanup 2017-11-01 01:48:47 +01:00
f3218c24c7 Mono: support custom script templates.
Also fixes a bug that prevented methods like `duplicate()` from copying the source code. (Copied from GDScript implementation)
2017-10-31 15:46:30 +01:00
27b7fb8e66 Mono: Add build project button and reload interval 2017-10-29 05:57:38 +01:00
a2247d45fc Mono: Use "UnnamedProject" if application/config/name is empty 2017-10-27 21:22:54 +02:00
d135008acf Merge pull request #12405 from Jerome67000/clean_getnodetype
Removes Script::get_node_type()

[ci skip]
2017-10-26 08:49:38 +02:00
2ae23c9f97 Fix default C# script 2017-10-25 22:43:06 +02:00
2609cc9ef4 Removes Script::get_node_type()
used before GDScript, with squirrel apparently
2017-10-25 20:11:30 +02:00
847c55bcb1 Merge pull request #12365 from neikeq/p
Add ScriptLanguage::supports_builtin_mode and improve ScriptCreateDialog
2017-10-24 18:59:26 +02:00
e218a13a64 Add ScriptLanguage::supports_builtin_mode and improve ScriptCreateDialog
- Make ScriptCreateDialog disable the built-in script checked button if the language does not support it.
- ScriptLanguage's get_template and make_template now receive the script path as class name if the the script language does not have named classes.
2017-10-24 15:48:58 +02:00
ba779c1c0c Add _process(delta) to new script templates. Closes #11994. 2017-10-22 21:07:34 +02:00
b1d106adb6 Mono: Fix warning about exported static fields 2017-10-18 08:34:17 +02:00
fb63ee52fb Mono: Fix build with tools=no or target=release 2017-10-18 08:27:18 +02:00
6e6b455d1f Export attribute fixes and improvements
- Allow non-public fields to be exported as well (to avoid confusion).
- Set PROPERTY_HINT_RESOURCE_TYPE for resource derived fields.
- Support enums and automatically fill PROPERTY_HINT_ENUM's hint_string for enum fields.
2017-10-17 14:42:13 +02:00
8de1dc7e9a Merge pull request #12138 from neikeq/i
Avoid adding built-in script path to csproj
2017-10-16 10:19:16 +02:00
967335b969 Avoid adding built-in script path to csproj 2017-10-16 04:26:13 +02:00
8ed3247a63 Improve signature of signal target generated function 2017-10-16 04:19:36 +02:00
1a9efb417a Merge pull request #12135 from neikeq/g
Re-write SignalAwaiter implementation
2017-10-16 03:58:51 +02:00
63369ec306 Re-write SignalAwaiter implementation
Old implementation had issues where you could only await on the same signal of the same source once.
2017-10-16 03:54:23 +02:00
740ef3dc97 Merge pull request #11954 from neikeq/d
Added 'exposed' field to ClassInfo for registered classes
2017-10-11 13:54:34 +02:00
9b6f65af82 Mono: Make use of ClassInfo's exposed API
- BindingsGenerator only generates exposed classes.
- Fix creation of managed instances of non-exposed classes.
2017-10-09 23:50:06 +02:00