commit
acaaf2e440
@ -95,7 +95,9 @@ MonoAssembly *GDMonoAssembly::_preload_hook(MonoAssemblyName *aname, char **asse
|
|||||||
(void)user_data; // UNUSED
|
(void)user_data; // UNUSED
|
||||||
|
|
||||||
if (search_dirs.empty()) {
|
if (search_dirs.empty()) {
|
||||||
|
#ifdef TOOLS_DOMAIN
|
||||||
search_dirs.push_back(GodotSharpDirs::get_res_temp_assemblies_dir());
|
search_dirs.push_back(GodotSharpDirs::get_res_temp_assemblies_dir());
|
||||||
|
#endif
|
||||||
search_dirs.push_back(GodotSharpDirs::get_res_assemblies_dir());
|
search_dirs.push_back(GodotSharpDirs::get_res_assemblies_dir());
|
||||||
search_dirs.push_back(OS::get_singleton()->get_resource_dir());
|
search_dirs.push_back(OS::get_singleton()->get_resource_dir());
|
||||||
search_dirs.push_back(OS::get_singleton()->get_executable_path().get_base_dir());
|
search_dirs.push_back(OS::get_singleton()->get_executable_path().get_base_dir());
|
||||||
|
@ -183,19 +183,19 @@ void GDMonoField::set_value(MonoObject *p_object, const Variant &p_value) {
|
|||||||
// GodotObject
|
// GodotObject
|
||||||
if (CACHED_CLASS(GodotObject)->is_assignable_from(type_class)) {
|
if (CACHED_CLASS(GodotObject)->is_assignable_from(type_class)) {
|
||||||
MonoObject *managed = GDMonoUtils::unmanaged_get_managed(p_value.operator Object *());
|
MonoObject *managed = GDMonoUtils::unmanaged_get_managed(p_value.operator Object *());
|
||||||
mono_field_set_value(p_object, mono_field, &managed);
|
mono_field_set_value(p_object, mono_field, managed);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (CACHED_CLASS(NodePath) == type_class) {
|
if (CACHED_CLASS(NodePath) == type_class) {
|
||||||
MonoObject *managed = GDMonoUtils::create_managed_from(p_value.operator NodePath());
|
MonoObject *managed = GDMonoUtils::create_managed_from(p_value.operator NodePath());
|
||||||
mono_field_set_value(p_object, mono_field, &managed);
|
mono_field_set_value(p_object, mono_field, managed);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (CACHED_CLASS(RID) == type_class) {
|
if (CACHED_CLASS(RID) == type_class) {
|
||||||
MonoObject *managed = GDMonoUtils::create_managed_from(p_value.operator RID());
|
MonoObject *managed = GDMonoUtils::create_managed_from(p_value.operator RID());
|
||||||
mono_field_set_value(p_object, mono_field, &managed);
|
mono_field_set_value(p_object, mono_field, managed);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -204,8 +204,6 @@ void GDMonoField::set_value(MonoObject *p_object, const Variant &p_value) {
|
|||||||
} break;
|
} break;
|
||||||
|
|
||||||
case MONO_TYPE_OBJECT: {
|
case MONO_TYPE_OBJECT: {
|
||||||
GDMonoClass *type_class = type.type_class;
|
|
||||||
|
|
||||||
// Variant
|
// Variant
|
||||||
switch (p_value.get_type()) {
|
switch (p_value.get_type()) {
|
||||||
case Variant::BOOL: {
|
case Variant::BOOL: {
|
||||||
@ -237,11 +235,11 @@ void GDMonoField::set_value(MonoObject *p_object, const Variant &p_value) {
|
|||||||
case Variant::COLOR: SET_FROM_STRUCT_AND_BREAK(Color);
|
case Variant::COLOR: SET_FROM_STRUCT_AND_BREAK(Color);
|
||||||
case Variant::NODE_PATH: {
|
case Variant::NODE_PATH: {
|
||||||
MonoObject *managed = GDMonoUtils::create_managed_from(p_value.operator NodePath());
|
MonoObject *managed = GDMonoUtils::create_managed_from(p_value.operator NodePath());
|
||||||
mono_field_set_value(p_object, mono_field, &managed);
|
mono_field_set_value(p_object, mono_field, managed);
|
||||||
} break;
|
} break;
|
||||||
case Variant::_RID: {
|
case Variant::_RID: {
|
||||||
MonoObject *managed = GDMonoUtils::create_managed_from(p_value.operator RID());
|
MonoObject *managed = GDMonoUtils::create_managed_from(p_value.operator RID());
|
||||||
mono_field_set_value(p_object, mono_field, &managed);
|
mono_field_set_value(p_object, mono_field, managed);
|
||||||
} break;
|
} break;
|
||||||
case Variant::OBJECT: {
|
case Variant::OBJECT: {
|
||||||
MonoObject *managed = GDMonoUtils::unmanaged_get_managed(p_value.operator Object *());
|
MonoObject *managed = GDMonoUtils::unmanaged_get_managed(p_value.operator Object *());
|
||||||
@ -250,7 +248,7 @@ void GDMonoField::set_value(MonoObject *p_object, const Variant &p_value) {
|
|||||||
}
|
}
|
||||||
case Variant::DICTIONARY: {
|
case Variant::DICTIONARY: {
|
||||||
MonoObject *managed = GDMonoMarshal::Dictionary_to_mono_object(p_value.operator Dictionary());
|
MonoObject *managed = GDMonoMarshal::Dictionary_to_mono_object(p_value.operator Dictionary());
|
||||||
mono_field_set_value(p_object, mono_field, &managed);
|
mono_field_set_value(p_object, mono_field, managed);
|
||||||
} break;
|
} break;
|
||||||
case Variant::ARRAY: SET_FROM_ARRAY_AND_BREAK(Array);
|
case Variant::ARRAY: SET_FROM_ARRAY_AND_BREAK(Array);
|
||||||
case Variant::POOL_BYTE_ARRAY: SET_FROM_ARRAY_AND_BREAK(PoolByteArray);
|
case Variant::POOL_BYTE_ARRAY: SET_FROM_ARRAY_AND_BREAK(PoolByteArray);
|
||||||
@ -268,7 +266,7 @@ void GDMonoField::set_value(MonoObject *p_object, const Variant &p_value) {
|
|||||||
case MONO_TYPE_GENERICINST: {
|
case MONO_TYPE_GENERICINST: {
|
||||||
if (CACHED_RAW_MONO_CLASS(Dictionary) == type.type_class->get_raw()) {
|
if (CACHED_RAW_MONO_CLASS(Dictionary) == type.type_class->get_raw()) {
|
||||||
MonoObject *managed = GDMonoMarshal::Dictionary_to_mono_object(p_value.operator Dictionary());
|
MonoObject *managed = GDMonoMarshal::Dictionary_to_mono_object(p_value.operator Dictionary());
|
||||||
mono_field_set_value(p_object, mono_field, &managed);
|
mono_field_set_value(p_object, mono_field, managed);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
} break;
|
} break;
|
||||||
|
Loading…
Reference in New Issue
Block a user