summaryrefslogtreecommitdiffstats
path: root/modules/mono/csharp_script.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Mono/C#: Initial exporter support for AOT compilationIgnacio Etcheverry2019-11-151-2/+0
|
* Mono/C#: WebAssembly supportIgnacio Etcheverry2019-11-131-9/+9
|
* Added some obvious errors explanationsqarmin2019-09-251-3/+3
|
* Adds skip-breakpoints featureiwek72019-09-031-1/+1
|
* Make VarArg methods return types show up as Variant in API jsontoasteater2019-08-261-1/+1
| | | | | | | | | | | | VarArg methods have the return type Object in the API json for GDNative. This can cause undefined behavior in some language bindings due to lack of documentation on VarArg methods' behavior. This changes the MethodInfo of: - CSharpScript::_new - GDScript::_new - PluginScript::_new
* Replace 'ERR_EXPLAIN' with 'ERR_FAIL_*_MSG' in 'modules/mono'Ignacio Etcheverry2019-08-091-70/+42
| | | | | | And 'CRASH_*_MSG' as well. Also make error messages puntuation and quotation more consistent.
* Add some code changes/fixes proposed by Coverity and Clang Tidyqarmin2019-08-071-2/+1
|
* Mono: Add option to keep running after unhandled exceptionsIgnacio Etcheverry2019-07-241-1/+0
| | | | | By default, an unhandled exception will cause the application to be terminated; but the project setting `mono/unhandled_exception_policy` was added to change this behaviour. The editor is hard-coded to never terminate because of unhandled exceptions, as that would make writing editor plugins a painful task, and we cannot kill the editor because of a mistake in a thirdparty plugin.
* Mono: Better handling of missing/outdated API assembliesIgnacio Etcheverry2019-07-141-12/+9
| | | | | | | | | | | Remove the old API assembly invalidation system. It's pretty simple since now the editor has a hard dependency on the API assemblies and SCons takes care of prebuilding them. If we fail to load a project's API assembly because it was either missing or outdated, we just copy the prebuilt assemblies to the project and try again. We also do this when creating the solution and before building, just in case the user removed them from the disk after they were loaded. This way the API assemblies will be always loaded successfully. If they are not, it's a bug. Also fixed: - EditorDef was behaving like GlobalDef in GodotTools. - NullReferenceException because we can't serialize System.WeakReference yet. Use Godot.WeakRef in the mean time.
* Fix EditorNavigationMeshGenerator registered in Core APIIgnacio Etcheverry2019-07-091-0/+13
| | | | Also added an option to output a json file with all the ClassDB registered classes and its members. This can be used to compare the API of two different builds by a simple diff.
* Mono: Fix build errors with tools=noIgnacio Etcheverry2019-07-081-2/+10
|
* C#: Fix some crashes during assemblies reloadingIgnacio Etcheverry2019-07-081-33/+41
|
* Re-write mono module editor code in C#Ignacio Etcheverry2019-07-051-100/+344
| | | | | | | | Make the build system automatically build the C# Api assemblies to be shipped with the editor. Make the editor, editor player and debug export templates use Api assemblies built with debug symbols. Always run MSBuild to build the editor tools and Api assemblies when building Godot. Several bugs fixed related to assembly hot reloading and restoring state. Fix StringExtensions internal calls not being registered correctly, resulting in MissingMethodException.
* Mono: Android build and shared libraries fixesIgnacio Etcheverry2019-07-031-6/+7
| | | | | Fix location of Mono's shared libraries. Fix build failing if the directory 'platform/android/java/libs/{target}/{abi}' doesn't exist.
* Remove unnecessary code and add some error explanationsqarmin2019-07-011-1/+1
|
* Some code changed with Clang-Tidyqarmin2019-06-261-4/+1
|
* C#: Implement ScriptInstance::to_stringIgnacio Etcheverry2019-05-241-0/+28
| | | | Create a blacklist of methods that must not be generated. Includes: "to_string", "_to_string" and "_init".
* C#: Marshalling support for IEnumerable<> and IDictionary<,>Ignacio Etcheverry2019-05-181-45/+91
| | | | Also fixed the hint string of exported members.
* C#: Support resource type hint in exported arraysIgnacio Etcheverry2019-04-291-1/+2
| | | | - Elements of types like PackedScene will display with the special editor for such type.
* Merge pull request #28423 from ↵Rémi Verschelde2019-04-291-8/+0
|\ | | | | | | | | neikeq/dont-forget-to-think-a-name-for-this-branch C#: Deprecate accessor methods and generate correct int and float types
| * C# bindings generator cleanupIgnacio Etcheverry2019-04-251-8/+0
| | | | | | | | | | | | - Normal log messages are no longer warnings. - BindingsGenerator is no longer a singleton. - Added a log function.
* | Mono: Lazily load scripts metadata fileIgnacio Etcheverry2019-04-261-2/+7
|/ | | | - Only load the scripts metadata file when it's really needed. This way we avoid false errors, when there is no C# project, about missing scripts metadata file.
* Merge pull request #27950 from Nonnu42/contribIgnacio Roldán Etcheverry2019-04-121-0/+29
|\ | | | | Fixes #17233 allowing C# to override _GetPropertyList
| * Fixes #17233 allowing C# to override _GetPropertyListNuno Cardoso2019-04-121-0/+29
| |
* | C#: Support type hints for exported ArraysIgnacio Etcheverry2019-04-061-1/+8
| | | | | | | | Added the code for Dictionary as well, but it's not yet supported by the Godot inspector.
* | C#: Add marshalling support for IEnumerable and IDictionaryIgnacio Etcheverry2019-04-061-3/+3
| | | | | | | | | | Added constructor that takes IEnumerable for Array and IEnumerable<T> for Array<T>. Added constructor that takes IDictionary for Dictionary and IDictionary<TKey, TValue> for Dictionary<TKey, TValue>.
* | Mono: Make missing default constructor error more foolproofForLoveOfCats2019-04-041-3/+3
|/
* C#: Update exports only in the editorIgnacio Etcheverry2019-03-131-0/+3
|
* Fix CSharpInstance::set not working with base classesIgnacio Etcheverry2019-03-081-2/+2
|
* Merge pull request #26773 from neikeq/issue-26628Rémi Verschelde2019-03-071-1/+4
|\ | | | | Mono: Fix crash with exported field of custom Reference derived type
| * Mono: Fix crash with exported field of custom Reference derived typeIgnacio Etcheverry2019-03-071-1/+4
| |
* | Mono: Partially implement some Godot debug api functionsIgnacio Etcheverry2019-03-071-9/+48
|/ | | | Debug breaks sent with debug_break and debug_break_parse should display correctly in the Godot debugger now.
* Merge pull request #26765 from neikeq/issue-25959Ignacio Etcheverry2019-03-071-0/+7
|\ | | | | Mono: Fix crash when re-using script binding after domain reloading
| * Mono: Fix crash when re-using script binding after domain reloadingIgnacio Etcheverry2019-03-071-0/+7
| |
* | Update scripts exports even when normal script instances are created to ↵Sebastian Hartte2019-03-071-0/+1
|/ | | | better support tool scripts with exported variables.
* Mono: Fail on script instance creation if constructor was not foundIgnacio Etcheverry2019-02-281-3/+30
| | | | Previously this would result in NULL dereferencing. Now we fail with an error.
* Fix -Wsign-compare warnings.marxin2019-02-271-2/+2
| | | | | I decided to modify code in a defensive way. Ideally functions like size() or length() should return an unsigned type.
* Add -Wshadow=local to warnings and fix reported issues.marxin2019-02-201-4/+4
| | | | Fixes #25316.
* Use script instance binding for objects constructed from C#Ignacio Etcheverry2019-02-091-8/+13
| | | | | | | Only possible if the object class is a "native type". If the object class is a user class (that derives a "native type") then a script is needed. Since CSharpLanguage does cleanup of script instance bindings when finished, cases like #25621 will no longer cause problems. Fixed ~Object() trying to free script instance bindings after the language has already been removed, which would result in a NULL dereference.
* Mono: Lifetime fixes for CSharpInstance and instance binding dataIgnacio Etcheverry2019-02-031-65/+153
| | | | | | | Avoid CSharpInstance from accessing its state after self destructing (by deleting the Reference owner). It's now safe to replace the script instance without leaking or crashing. Also fixed godot_icall_Object_weakref return reference being freed before returning.
* Mono: CleanupIgnacio Etcheverry2019-02-031-6/+6
|
* Mono: Fix hot reload build errors and cleanupIgnacio Etcheverry2019-01-221-4/+17
|
* Mono: Add assembly reloading to running gamesIgnacio Etcheverry2019-01-211-24/+3
| | | | Add environment variable to specify a custom --debugger-agent for mono.
* C#: Fix crash due to missing gchandle ref null checkIgnacio Etcheverry2019-01-171-1/+1
|
* Merge pull request #24877 from neikeq/issue-24280Rémi Verschelde2019-01-101-7/+7
|\ | | | | Fix properties being lost when reloading placeholder GDScript instance
| * Fix properties being lost when reloading placeholder GDScript instanceIgnacio Etcheverry2019-01-101-7/+7
| | | | | | | | | | | | | | During reloading in `GDScriptLanguage::reload_all_scripts` a placeholder instance that must remain so is replaced with a new placeholder instance. The state is then restored by calling `ScriptInstance::set` for each property. This does not work if the script is missing the properties due to build/parse failing. The fix for such cases is to call `placeholder_set_fallback` instead of `set` on the script instance. I took this chance to move the `build_failed` flag from `PlaceHolderScriptInstance` to `Script`. That improves the code a lot. I also renamed it to `placeholder_fallback_enabled` which is a much better name (`build_failed` could lead to misunderstandings).
* | Update copyright statements to 2019Rémi Verschelde2019-01-011-2/+2
| | | | | | | | Happy new year to the wonderful Godot community!
* | Tweaks after feedbackBen Rog-Wilhelm2018-12-081-0/+1
| |
* | Implement CSharpScript::get_script_method_list and related functionality.Ben Rog-Wilhelm2018-12-071-0/+30
|/
* Fix crash due to ~CSharpInstance() being called on freed instanceIgnacio Etcheverry2018-12-011-3/+6
| | | | This would be the case when calling SetScript on an object with a C# script.