Expose various engine features to scripting

This commit is contained in:
Wojtek Figat
2023-01-31 16:01:56 +01:00
parent a0c6add732
commit b071cdb843
6 changed files with 17 additions and 27 deletions

View File

@@ -161,6 +161,11 @@ namespace FlaxEngine
}
}
/// <summary>
/// Gets the aspect ratio used by the viewport.
/// </summary>
public float AspectRatio => !Mathf.IsZero(Height) ? Width / Height : 0f;
/// <summary>
/// Determines whether the specified <see cref="Viewport"/> is equal to this instance.
/// </summary>
@@ -326,21 +331,5 @@ namespace FlaxEngine
vector /= w;
}
}
/// <summary>
/// Gets the aspect ratio used by the viewport.
/// </summary>
/// <value>The aspect ratio.</value>
public float AspectRatio
{
get
{
if (!Mathf.IsZero(Height))
{
return Width / Height;
}
return 0f;
}
}
}
}