Merge remote-tracking branch 'origin/master' into 1.7

This commit is contained in:
Wojtek Figat
2023-09-27 17:32:47 +02:00
40 changed files with 710 additions and 164 deletions

View File

@@ -5,7 +5,8 @@ using System;
namespace FlaxEngine
{
/// <summary>
/// Indicates that a field or a property of a serializable class should be serialized. This class cannot be inherited.
/// Indicates that a field or a property of a serializable class should be serialized.
/// The <see cref="FlaxEngine.ShowInEditorAttribute"/> attribute is required to show hidden fields in the editor.
/// </summary>
[AttributeUsage(AttributeTargets.Field | AttributeTargets.Property)]
public sealed class SerializeAttribute : Attribute

View File

@@ -703,13 +703,12 @@ bool MAssembly::LoadImage(const String& assemblyPath, const StringView& nativePa
{
// TODO: Use new hostfxr delegate load_assembly_bytes? (.NET 8+)
// Open .Net assembly
const StringAnsi assemblyPathAnsi = assemblyPath.ToStringAnsi();
const char* name;
const char* fullname;
const char* name = nullptr;
const char* fullname = nullptr;
static void* LoadAssemblyImagePtr = GetStaticMethodPointer(TEXT("LoadAssemblyImage"));
_handle = CallStaticMethod<void*, const char*, const char**, const char**>(LoadAssemblyImagePtr, assemblyPathAnsi.Get(), &name, &fullname);
_name = name;
_fullname = fullname;
_handle = CallStaticMethod<void*, const Char*, const char**, const char**>(LoadAssemblyImagePtr, assemblyPath.Get(), &name, &fullname);
_name = StringAnsi(name);
_fullname = StringAnsi(fullname);
MCore::GC::FreeMemory((void*)name);
MCore::GC::FreeMemory((void*)fullname);
if (_handle == nullptr)