Expose various engine features to scripting
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user