You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-12-01 16:38:31 +00:00
C#: Sync GD with Core
- Add overloads to print methods that take a single `string`. - Use `StringBuilder` to append print parameters. - Remove `PrintStack` method. - Add `ErrorString`. - Remove `Str` method. - Add exception to `Range` when step is 0. - Add `VarToBytesWithObjects` and `BytesToVarWithObjects`. - Remove optional boolean parameter from `VarToBytes` and `BytesToVar`. - Move `InstanceFromId` to `Godot.Object`. - Add `Godot.Object.IsInstanceIdValid`. - Update documentation.
This commit is contained in:
@@ -1180,21 +1180,6 @@ void godotsharp_weakref(Object *p_ptr, Ref<RefCounted> *r_weak_ref) {
|
||||
memnew_placement(r_weak_ref, Ref<RefCounted>(wref));
|
||||
}
|
||||
|
||||
void godotsharp_str(const godot_array *p_what, godot_string *r_ret) {
|
||||
String &str = *memnew_placement(r_ret, String);
|
||||
const Array &what = *reinterpret_cast<const Array *>(p_what);
|
||||
|
||||
for (int i = 0; i < what.size(); i++) {
|
||||
String os = what[i].operator String();
|
||||
|
||||
if (i == 0) {
|
||||
str = os;
|
||||
} else {
|
||||
str += os;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void godotsharp_print(const godot_string *p_what) {
|
||||
print_line(*reinterpret_cast<const String *>(p_what));
|
||||
}
|
||||
@@ -1488,7 +1473,6 @@ static const void *unmanaged_callbacks[]{
|
||||
(void *)godotsharp_rand_from_seed,
|
||||
(void *)godotsharp_seed,
|
||||
(void *)godotsharp_weakref,
|
||||
(void *)godotsharp_str,
|
||||
(void *)godotsharp_str_to_var,
|
||||
(void *)godotsharp_var_to_bytes,
|
||||
(void *)godotsharp_var_to_str,
|
||||
|
||||
Reference in New Issue
Block a user