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

This commit is contained in:
Wojtek Figat
2023-10-01 13:17:41 +02:00
58 changed files with 786 additions and 388 deletions

View File

@@ -1230,7 +1230,7 @@ namespace FlaxEngine.Interop
internal static bool GetTypeIsReference(ManagedHandle typeHandle)
{
Type type = Unsafe.As<TypeHolder>(typeHandle.Target);
return type.IsByRef;
return !type.IsValueType; // Maybe also type.IsByRef?
}
[UnmanagedCallersOnly]

View File

@@ -181,6 +181,11 @@ void Screen::SetGameWindowMode(GameWindowMode windowMode)
#endif
}
Window* Screen::GetMainWindow()
{
return Engine::MainWindow;
}
void ScreenService::Update()
{
#if USE_EDITOR

View File

@@ -96,4 +96,10 @@ DECLARE_SCRIPTING_TYPE_NO_SPAWN(Screen);
/// </remarks>
/// <param name="windowMode">The window mode.</param>
API_PROPERTY() static void SetGameWindowMode(GameWindowMode windowMode);
/// <summary>
/// Gets the main window.
/// </summary>
/// <returns>The current window. Will be null if fails.</returns>
API_PROPERTY() static Window* GetMainWindow();
};