summaryrefslogtreecommitdiffstats
path: root/modules/mono/csharp_script.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
| * 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.
* Implement CSharpScript::is_valid()Ignacio Etcheverry2018-11-301-4/+0
|
* Merge pull request #24091 from neikeq/iiIgnacio Etcheverry2018-11-301-288/+295
|\ | | | | C#: Improve tool script support and fix reloading issues
| * C#: Improve tool script support and fix reloading issuesIgnacio Etcheverry2018-11-301-288/+295
| |
* | Allow signal connecting even if script is invalid (only when compiled with ↵Juan Linietsky2018-11-271-0/+4
|/ | | | tools), fixes #17070
* Improve the C# API projects generationIgnacio Etcheverry2018-11-081-1/+2
| | | | | | - Now there is only one solution that contains both GodotSharp and GodotSharpEditor project. Previously we had one solution for each project - GodotSharpEditor reference GodotShatp with a 'ProjectReference'. Previously it was a 'Reference' to the assembly - This also simplifies the command line option to generate this solution: 'godot --generate-cs-api <OutputDir>'
* Merge pull request #23162 from neikeq/ccIgnacio Etcheverry2018-10-251-42/+92
|\ | | | | Proper support for namespaces and other enhancement/fixes
| * Parse C# script namespace and classIgnacio Etcheverry2018-10-251-42/+92
| | | | | | | | - Added a very simple parser that can extract the namespace and class name of a C# script.
* | C#: Fix crash when disposing Reference on domain finalizeIgnacio Etcheverry2018-10-251-0/+2
|/
* Remove redundant "== false" codeAaron Franke2018-10-061-1/+1
| | | | | | Some of this code has been re-organized. f
* Remove redundant "== true" codeAaron Franke2018-10-061-2/+2
| | | If it can be compared to a boolean, it can be evaluated as one in-place.
* Mono: Fix not creating generic Array or Dictionary where expectedIgnacio Etcheverry2018-09-271-1/+1
|
* Clearly deprecate sync too in favor of remotesync.Fabio Alessandrelli2018-09-151-2/+2
| | | | | NOTE: This changes the RPC_MODE_* enum values. Games should be re-exported. GDNative rebuilt.
* Rename slave keyword to puppetFabio Alessandrelli2018-09-151-3/+5
| | | | | The slave keyword will still be available as deprecated in 3.1 but will be dropped from future releases.
* Mono: Fix build regression due to wrong return typeIgnacio Etcheverry2018-09-121-2/+2
|
* C#: Fix explicit enum values when exporting memberIgnacio Etcheverry2018-09-121-31/+86
|
* Make core/ includes absolute, remove subfolders from include pathRémi Verschelde2018-09-121-4/+4
| | | | | | This allows more consistency in the manner we include core headers, where previously there would be a mix of absolute, relative and include path-dependent includes.
* Fix/workaround for issue #21667Ignacio Etcheverry2018-09-121-80/+262
| | | | When a Reference managed instance is garbage collected and its finalizer is called, it could happen that the native instance is referenced once again before the finalizer can unreference and memdelete it. The workaround is to create a new managed instance when this happens (at least for now).
* Cleanup of c# api files and bindings generatorIgnacio Etcheverry2018-09-121-1/+1
| | | | | | | | | | | | - We no longer generate RID and NodePath C# classes. Both will be maintained manually. - We no longer generate C# declarations and runtime registration of internal calls for the following classes: RID, NodePath, String, GD, SignalAwaiter and Godot.Object (partial base). - We no longer auto-generate the base members of Godot.Object. They will be maintained manually as a partial class. This makes it easier to maintain these C# classes and their internal calls, as well as the bindings generator which no longer generates C# classes that don't derive from Godot Object, and it no longer generates the Godot.Object base members (which where unreadable in the bindings generator code). - Added missing 'RID(Object from)' constructor to the RID C# class. - Replaced MONO_GLUE_DISABLED constant macro with MONO_GLUE_ENABLED. - Add sources in module/mono/glue even if glue is disabled, but surround glue files with ifdef MONO_GLUE_ENABLED.
* Merge pull request #16927 from neikeq/rework-refcount-notifyJuan Linietsky2018-08-251-4/+71
|\ | | | | Notify instance binding data api of refcount increment/decrement
| * Notify instance binding data api of refcount increment/decrementIgnacio Etcheverry2018-08-231-4/+71
| |
* | Add print_verbose to print to stdout only in verbose modeRémi Verschelde2018-08-241-5/+1
| | | | | | | | | | | | Equivalent of the cumbersome: if (OS::get_singleton()->is_stdout_verbose()) print_line(msg);
* | Fix case where exported properties value is lostIgnacio Etcheverry2018-07-291-16/+59
| | | | | | | | | | | | | | | | | | | | Fixes exported property modified values lost when creating a placeholder script instance with a failed script compilation - Object set/get will call PlaceHolderScriptInstance's new fallback set/get methods as a last resort. This way, placeholder script instances can keep the values for storage or until the script is compiled successfuly. - Script::can_instance() will only return true if a real script instance can be created. Otherwise, in the case of placeholder script instances, it will return false. - Object::set_script(script) is now in charge of requesting the creation of placeholder script instances. It's no longer Script::instance_create(owner)'s duty. - PlaceHolderScriptInstance has a new method set_build_failed(bool) to determine whether it should call into its script methods or not. - Fixed a few problems during reloading of C# scripts.
* | Reduce unnecessary COW on Vector by make writing explicitHein-Pieter van Braam2018-07-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit makes operator[] on Vector const and adds a write proxy to it. From now on writes to Vectors need to happen through the .write proxy. So for instance: Vector<int> vec; vec.push_back(10); std::cout << vec[0] << std::endl; vec.write[0] = 20; Failing to use the .write proxy will cause a compilation error. In addition COWable datatypes can now embed a CowData pointer to their data. This means that String, CharString, and VMap no longer use or derive from Vector. _ALWAYS_INLINE_ and _FORCE_INLINE_ are now equivalent for debug and non-debug builds. This is a lot faster for Vector in the editor and while running tests. The reason why this difference used to exist is because force-inlined methods used to give a bad debugging experience. After extensive testing with modern compilers this is no longer the case.
* | Fix continuous attempt to reload domain with API assemblies out of syncIgnacio Etcheverry2018-07-251-20/+26
| |
* | Mono: Fix domain reload never triggeringIgnacio Etcheverry2018-07-251-0/+2
| |
* | Fix '!valid' error spam on C# script instance createIgnacio Etcheverry2018-07-251-6/+6
| |
* | Mono: Fix null dereferencesIgnacio Etcheverry2018-07-251-0/+3
| |
* | Merge pull request #15880 from neikeq/better-collectionsIgnacio Etcheverry2018-07-231-1/+1
|\ \ | | | | | | Mono: Add Dictionary and Array classes
| * | Add Array and Dictionary wrapper classes to C#Ignacio Etcheverry2018-07-201-1/+1
| | |
* | | Mono: Default to not shipping C# scripts contentRémi Verschelde2018-07-221-1/+1
|/ / | | | | | | Fixes #20053.
* | Merge pull request #19872 from exts/export_signalsIgnacio Etcheverry2018-07-041-32/+25
|\ \ | | | | | | Mono: Fixes annotated signal loading in exported binaries
| * | Mono: Fixes annotated signal loading in exported binaries=2018-07-031-32/+25
| | |
* | | Merge pull request #16987 from neikeq/pending-exceptionsIgnacio Etcheverry2018-07-041-21/+23
|\ \ \ | | | | | | | | Mono: Pending exceptions and cleanup