Use consistent and less verbose deprecation messages
This commit is contained in:
@@ -22,7 +22,7 @@ namespace FlaxEditor.CustomEditors.Elements
|
||||
/// <summary>
|
||||
/// [Deprecated on 26.05.2022, expires on 26.05.2024]
|
||||
/// </summary>
|
||||
[System.Obsolete("Deprecated in 1.4, use ValueBox instead")]
|
||||
[System.Obsolete("Use ValueBox instead")]
|
||||
public DoubleValueBox DoubleValue => ValueBox;
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -22,7 +22,7 @@ namespace FlaxEditor.CustomEditors.Elements
|
||||
/// <summary>
|
||||
/// [Deprecated on 26.05.2022, expires on 26.05.2024]
|
||||
/// </summary>
|
||||
[System.Obsolete("Deprecated in 1.4, use ValueBox instead")]
|
||||
[System.Obsolete("Use ValueBox instead")]
|
||||
public FloatValueBox FloatValue => ValueBox;
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -850,7 +850,7 @@ namespace FlaxEditor
|
||||
/// New asset types allowed to create.
|
||||
/// [Deprecated in v1.8]
|
||||
/// </summary>
|
||||
[Obsolete("Use CreateAsset with named tag.")]
|
||||
[Obsolete("Use CreateAsset with named tag instead")]
|
||||
public enum NewAssetType
|
||||
{
|
||||
/// <summary>
|
||||
@@ -1031,7 +1031,7 @@ namespace FlaxEditor
|
||||
/// </summary>
|
||||
/// <param name="type">New asset type.</param>
|
||||
/// <param name="outputPath">Output asset path.</param>
|
||||
[Obsolete("Use CreateAsset with named tag.")]
|
||||
[Obsolete("Use CreateAsset with named tag instead")]
|
||||
public static bool CreateAsset(NewAssetType type, string outputPath)
|
||||
{
|
||||
// [Deprecated on 18.02.2024, expires on 18.02.2025]
|
||||
|
||||
@@ -171,7 +171,7 @@ namespace FlaxEngine
|
||||
/// <param name="ray">The ray to test.</param>
|
||||
/// <param name="distance">When the method completes, contains the distance of the intersection, or 0 if there was no intersection.</param>
|
||||
/// <returns>Whether the two objects intersected.</returns>
|
||||
[Obsolete("Deprecated in v1.4")]
|
||||
[Obsolete("Use Intersects with 'out Real distance' parameter instead")]
|
||||
public bool Intersects(ref Ray ray, out float distance)
|
||||
{
|
||||
var result = CollisionsHelper.RayIntersectsBox(ref ray, ref this, out Real dst);
|
||||
|
||||
@@ -659,7 +659,7 @@ namespace FlaxEngine
|
||||
/// <param name="plane">The plane to test.</param>
|
||||
/// <param name="distance">When the method completes, contains the distance of the intersection, or 0 if there was no intersection.</param>
|
||||
/// <returns>Whether the two objects intersect.</returns>
|
||||
[Obsolete("Deprecated in 1.4")]
|
||||
[Obsolete("Use RayIntersectsPlane with 'out Real distance' parameter instead")]
|
||||
public static bool RayIntersectsPlane(ref Ray ray, ref Plane plane, out float distance)
|
||||
{
|
||||
//Source: Real-Time Collision Detection by Christer Ericson
|
||||
|
||||
@@ -645,6 +645,7 @@ namespace FlaxEngine
|
||||
|
||||
/// <summary>
|
||||
/// Maps the specified value from the given range into another.
|
||||
/// [Deprecated on 17.04.2023, expires on 17.04.2024]
|
||||
/// </summary>
|
||||
/// <param name="value">The value to map from range [fromMin; fromMax].</param>
|
||||
/// <param name="fromMin">The source range minimum value.</param>
|
||||
@@ -652,8 +653,7 @@ namespace FlaxEngine
|
||||
/// <param name="toMin">The destination range minimum value.</param>
|
||||
/// <param name="toMax">The destination range maximum value.</param>
|
||||
/// <returns>The mapped value in range [toMin; toMax].</returns>
|
||||
// [Deprecated on 17.04.2023, expires on 17.04.2024]
|
||||
[Obsolete("Please use Remap to upkeep the API consistency")]
|
||||
[Obsolete("Use Remap instead")]
|
||||
public static double Map(double value, double fromMin, double fromMax, double toMin, double toMax)
|
||||
{
|
||||
double t = (value - fromMin) / (fromMax - fromMin);
|
||||
|
||||
@@ -808,6 +808,7 @@ namespace FlaxEngine
|
||||
|
||||
/// <summary>
|
||||
/// Maps the specified value from the given range into another.
|
||||
/// [Deprecated on 17.04.2023, expires on 17.04.2024]
|
||||
/// </summary>
|
||||
/// <param name="value">The value to map from range [fromMin; fromMax].</param>
|
||||
/// <param name="fromMin">The source range minimum value.</param>
|
||||
@@ -815,8 +816,7 @@ namespace FlaxEngine
|
||||
/// <param name="toMin">The destination range minimum value.</param>
|
||||
/// <param name="toMax">The destination range maximum value.</param>
|
||||
/// <returns>The mapped value in range [toMin; toMax].</returns>
|
||||
// [Deprecated on 17.04.2023, expires on 17.04.2024]
|
||||
[Obsolete("Please use Remap to upkeep the API consistency")]
|
||||
[Obsolete("Use Remap instead")]
|
||||
public static float Map(float value, float fromMin, float fromMax, float toMin, float toMax)
|
||||
{
|
||||
float t = (value - fromMin) / (fromMax - fromMin);
|
||||
|
||||
@@ -825,7 +825,7 @@ namespace FlaxEngine
|
||||
/// <param name="rotation">When the method completes, contains the rotation component of the decomposed matrix.</param>
|
||||
/// <param name="translation">When the method completes, contains the translation component of the decomposed matrix.</param>
|
||||
/// <remarks>This method is designed to decompose an SRT transformation matrix only.</remarks>
|
||||
[Obsolete("Deprecated in v1.8")]
|
||||
[Obsolete("Use Decompose with 'out Matrix3x3 rotation' parameter instead")]
|
||||
public void Decompose(out Float3 scale, out Matrix rotation, out Float3 translation)
|
||||
{
|
||||
Decompose(out scale, out Matrix3x3 r, out translation);
|
||||
|
||||
@@ -149,7 +149,7 @@ namespace FlaxEngine
|
||||
/// <param name="plane">The plane to test.</param>
|
||||
/// <param name="distance">When the method completes, contains the distance of the intersection, or 0 if there was no intersection.</param>
|
||||
/// <returns>Whether the two objects intersected.</returns>
|
||||
[Obsolete("Deprecated in 1.4")]
|
||||
[Obsolete("Use Intersects with 'out Real distance' parameter instead")]
|
||||
public bool Intersects(ref Plane plane, out float distance)
|
||||
{
|
||||
return CollisionsHelper.RayIntersectsPlane(ref this, ref plane, out distance);
|
||||
@@ -202,7 +202,7 @@ namespace FlaxEngine
|
||||
/// <param name="vertex3">The third vertex of the triangle to test.</param>
|
||||
/// <param name="distance">When the method completes, contains the distance of the intersection, or 0 if there was no intersection.</param>
|
||||
/// <returns>Whether the two objects intersected.</returns>
|
||||
[Obsolete("Deprecated in 1.4")]
|
||||
[Obsolete("Use Intersects with 'out Real distance' parameter instead")]
|
||||
public bool Intersects(ref Vector3 vertex1, ref Vector3 vertex2, ref Vector3 vertex3, out float distance)
|
||||
{
|
||||
var result = CollisionsHelper.RayIntersectsTriangle(ref this, ref vertex1, ref vertex2, ref vertex3, out Real dst);
|
||||
@@ -305,7 +305,7 @@ namespace FlaxEngine
|
||||
/// <param name="sphere">The sphere to test.</param>
|
||||
/// <param name="distance">When the method completes, contains the distance of the intersection, or 0 if there was no intersection.</param>
|
||||
/// <returns>Whether the two objects intersected.</returns>
|
||||
[Obsolete("Deprecated in 1.4")]
|
||||
[Obsolete("Use Intersects with 'out Real distance' parameter instead")]
|
||||
public bool Intersects(ref BoundingSphere sphere, out float distance)
|
||||
{
|
||||
var result = CollisionsHelper.RayIntersectsSphere(ref this, ref sphere, out Real dst);
|
||||
|
||||
@@ -28,7 +28,7 @@ namespace FlaxEngine
|
||||
/// <summary>
|
||||
/// Occurs when event is triggered (e.g. user pressed a key). Called before scripts update.
|
||||
/// </summary>
|
||||
[System.Obsolete("Depreciated in 1.7, use Pressed Action.")]
|
||||
[System.Obsolete("Use Pressed instead")]
|
||||
public event Action Triggered;
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -339,7 +339,7 @@ namespace FlaxEngine
|
||||
/// <param name="tangents">The normal vectors (per vertex). Use null to compute them from normal vectors.</param>
|
||||
/// <param name="uv">The texture coordinates (per vertex).</param>
|
||||
/// <param name="colors">The vertex colors (per vertex).</param>
|
||||
[Obsolete("Deprecated in 1.4, use overload with Float3 and Float2 parameters")]
|
||||
[Obsolete("Use UpdateMesh with Float3 and Float2 parameters instead")]
|
||||
public void UpdateMesh(Vector3[] vertices, int[] triangles, Vector3[] normals = null, Vector3[] tangents = null, Vector2[] uv = null, Color32[] colors = null)
|
||||
{
|
||||
UpdateMesh(Utils.ConvertCollection(vertices), triangles, Utils.ConvertCollection(normals), Utils.ConvertCollection(tangents), Utils.ConvertCollection(uv), colors);
|
||||
@@ -357,7 +357,7 @@ namespace FlaxEngine
|
||||
/// <param name="tangents">The normal vectors (per vertex). Use null to compute them from normal vectors.</param>
|
||||
/// <param name="uv">The texture coordinates (per vertex).</param>
|
||||
/// <param name="colors">The vertex colors (per vertex).</param>
|
||||
[Obsolete("Deprecated in 1.4, use overload with Float3 and Float2 parameters")]
|
||||
[Obsolete("Use UpdateMesh with Float3 and Float2 parameters instead")]
|
||||
public void UpdateMesh(List<Vector3> vertices, List<int> triangles, List<Vector3> normals = null, List<Vector3> tangents = null, List<Vector2> uv = null, List<Color32> colors = null)
|
||||
{
|
||||
UpdateMesh(Utils.ConvertCollection(vertices), triangles, Utils.ConvertCollection(normals), Utils.ConvertCollection(tangents), Utils.ConvertCollection(uv), colors);
|
||||
@@ -375,7 +375,7 @@ namespace FlaxEngine
|
||||
/// <param name="tangents">The normal vectors (per vertex). Use null to compute them from normal vectors.</param>
|
||||
/// <param name="uv">The texture coordinates (per vertex).</param>
|
||||
/// <param name="colors">The vertex colors (per vertex).</param>
|
||||
[Obsolete("Deprecated in 1.4, use overload with Float3 and Float2 parameters")]
|
||||
[Obsolete("Use UpdateMesh with Float3 and Float2 parameters instead")]
|
||||
public void UpdateMesh(Vector3[] vertices, uint[] triangles, Vector3[] normals = null, Vector3[] tangents = null, Vector2[] uv = null, Color32[] colors = null)
|
||||
{
|
||||
UpdateMesh(Utils.ConvertCollection(vertices), triangles, Utils.ConvertCollection(normals), Utils.ConvertCollection(tangents), Utils.ConvertCollection(uv), colors);
|
||||
@@ -393,7 +393,7 @@ namespace FlaxEngine
|
||||
/// <param name="tangents">The normal vectors (per vertex). Use null to compute them from normal vectors.</param>
|
||||
/// <param name="uv">The texture coordinates (per vertex).</param>
|
||||
/// <param name="colors">The vertex colors (per vertex).</param>
|
||||
[Obsolete("Deprecated in 1.4, use overload with Float3 and Float2 parameters")]
|
||||
[Obsolete("Use UpdateMesh with Float3 and Float2 parameters instead")]
|
||||
public void UpdateMesh(List<Vector3> vertices, List<uint> triangles, List<Vector3> normals = null, List<Vector3> tangents = null, List<Vector2> uv = null, List<Color32> colors = null)
|
||||
{
|
||||
UpdateMesh(Utils.ConvertCollection(vertices), triangles, Utils.ConvertCollection(normals), Utils.ConvertCollection(tangents), Utils.ConvertCollection(uv), colors);
|
||||
@@ -411,7 +411,7 @@ namespace FlaxEngine
|
||||
/// <param name="tangents">The tangent vectors (per vertex). Use null to compute them from normal vectors.</param>
|
||||
/// <param name="uv">The texture coordinates (per vertex).</param>
|
||||
/// <param name="colors">The vertex colors (per vertex).</param>
|
||||
[Obsolete("Deprecated in 1.4, use overload with Float3 and Float2 parameters")]
|
||||
[Obsolete("Use UpdateMesh with Float3 and Float2 parameters instead")]
|
||||
public void UpdateMesh(Vector3[] vertices, ushort[] triangles, Vector3[] normals = null, Vector3[] tangents = null, Vector2[] uv = null, Color32[] colors = null)
|
||||
{
|
||||
UpdateMesh(Utils.ConvertCollection(vertices), triangles, Utils.ConvertCollection(normals), Utils.ConvertCollection(tangents), Utils.ConvertCollection(uv), colors);
|
||||
@@ -429,7 +429,7 @@ namespace FlaxEngine
|
||||
/// <param name="tangents">The tangent vectors (per vertex). Use null to compute them from normal vectors.</param>
|
||||
/// <param name="uv">The texture coordinates (per vertex).</param>
|
||||
/// <param name="colors">The vertex colors (per vertex).</param>
|
||||
[Obsolete("Deprecated in 1.4, use overload with Float3 and Float2 parameters")]
|
||||
[Obsolete("Use UpdateMesh with Float3 and Float2 parameters instead")]
|
||||
public void UpdateMesh(List<Vector3> vertices, List<ushort> triangles, List<Vector3> normals = null, List<Vector3> tangents = null, List<Vector2> uv = null, List<Color32> colors = null)
|
||||
{
|
||||
UpdateMesh(Utils.ConvertCollection(vertices), triangles, Utils.ConvertCollection(normals), Utils.ConvertCollection(tangents), Utils.ConvertCollection(uv), colors);
|
||||
|
||||
@@ -216,7 +216,7 @@ namespace FlaxEngine
|
||||
/// <param name="normals">The normal vectors (per vertex).</param>
|
||||
/// <param name="tangents">The normal vectors (per vertex). Use null to compute them from normal vectors.</param>
|
||||
/// <param name="uv">The texture coordinates (per vertex).</param>
|
||||
[Obsolete("Deprecated in 1.4, use overload with Float3 and Float2 parameters")]
|
||||
[Obsolete("Use UpdateMesh with Float3 and Float2 parameters instead")]
|
||||
public void UpdateMesh(Vector3[] vertices, int[] triangles, Int4[] blendIndices, Vector4[] blendWeights, Vector3[] normals = null, Vector3[] tangents = null, Vector2[] uv = null)
|
||||
{
|
||||
UpdateMesh(Utils.ConvertCollection(vertices), triangles, blendIndices, Utils.ConvertCollection(blendWeights), Utils.ConvertCollection(normals), Utils.ConvertCollection(tangents), Utils.ConvertCollection(uv));
|
||||
@@ -235,7 +235,7 @@ namespace FlaxEngine
|
||||
/// <param name="normals">The normal vectors (per vertex).</param>
|
||||
/// <param name="tangents">The normal vectors (per vertex). Use null to compute them from normal vectors.</param>
|
||||
/// <param name="uv">The texture coordinates (per vertex).</param>
|
||||
[Obsolete("Deprecated in 1.4, use overload with Float3 and Float2 parameters")]
|
||||
[Obsolete("Use UpdateMesh with Float3 and Float2 parameters instead")]
|
||||
public void UpdateMesh(Vector3[] vertices, uint[] triangles, Int4[] blendIndices, Vector4[] blendWeights, Vector3[] normals = null, Vector3[] tangents = null, Vector2[] uv = null)
|
||||
{
|
||||
UpdateMesh(Utils.ConvertCollection(vertices), triangles, blendIndices, Utils.ConvertCollection(blendWeights), Utils.ConvertCollection(normals), Utils.ConvertCollection(tangents), Utils.ConvertCollection(uv));
|
||||
@@ -254,7 +254,7 @@ namespace FlaxEngine
|
||||
/// <param name="normals">The normal vectors (per vertex).</param>
|
||||
/// <param name="tangents">The tangent vectors (per vertex). Use null to compute them from normal vectors.</param>
|
||||
/// <param name="uv">The texture coordinates (per vertex).</param>
|
||||
[Obsolete("Deprecated in 1.4, use overload with Float3 and Float2 parameters")]
|
||||
[Obsolete("Use UpdateMesh with Float3 and Float2 parameters instead")]
|
||||
public void UpdateMesh(Vector3[] vertices, ushort[] triangles, Int4[] blendIndices, Vector4[] blendWeights, Vector3[] normals = null, Vector3[] tangents = null, Vector2[] uv = null)
|
||||
{
|
||||
UpdateMesh(Utils.ConvertCollection(vertices), triangles, blendIndices, Utils.ConvertCollection(blendWeights), Utils.ConvertCollection(normals), Utils.ConvertCollection(tangents), Utils.ConvertCollection(uv));
|
||||
|
||||
@@ -19,7 +19,7 @@ namespace FlaxEngine
|
||||
/// <param name="convexFlags">The convex mesh generation flags.</param>
|
||||
/// <param name="convexVertexLimit">The convex mesh vertex limit. Use values in range [8;255]</param>
|
||||
/// <returns>True if failed, otherwise false.</returns>
|
||||
[Obsolete("Deprecated in 1.4, use overload with Float3 and Float2 parameters")]
|
||||
[Obsolete("Use CookCollision with Float3 and Float2 parameters instead")]
|
||||
public bool CookCollision(CollisionDataType type, Vector3[] vertices, uint[] triangles, ConvexMeshGenerationFlags convexFlags = ConvexMeshGenerationFlags.None, int convexVertexLimit = 255)
|
||||
{
|
||||
if (vertices == null)
|
||||
@@ -43,7 +43,7 @@ namespace FlaxEngine
|
||||
/// <param name="convexFlags">The convex mesh generation flags.</param>
|
||||
/// <param name="convexVertexLimit">The convex mesh vertex limit. Use values in range [8;255]</param>
|
||||
/// <returns>True if failed, otherwise false.</returns>
|
||||
[Obsolete("Deprecated in 1.4, use overload with Float3 and Float2 parameters")]
|
||||
[Obsolete("Use CookCollision with Float3 and Float2 parameters instead")]
|
||||
public bool CookCollision(CollisionDataType type, Vector3[] vertices, int[] triangles, ConvexMeshGenerationFlags convexFlags = ConvexMeshGenerationFlags.None, int convexVertexLimit = 255)
|
||||
{
|
||||
if (vertices == null)
|
||||
@@ -60,7 +60,7 @@ namespace FlaxEngine
|
||||
/// </summary>
|
||||
/// <param name="vertexBuffer">The output vertex buffer.</param>
|
||||
/// <param name="indexBuffer">The output index buffer.</param>
|
||||
[Obsolete("Deprecated in 1.4, use overload with Float3 and Float2 parameters")]
|
||||
[Obsolete("Use ExtractGeometry with Float3 and Float2 parameters instead")]
|
||||
public void ExtractGeometry(out Vector3[] vertexBuffer, out int[] indexBuffer)
|
||||
{
|
||||
ExtractGeometry(out Float3[] tmp, out indexBuffer);
|
||||
|
||||
@@ -23,7 +23,7 @@ namespace FlaxEngine
|
||||
/// <param name="source">The source location.</param>
|
||||
/// <param name="destination">The destination location.</param>
|
||||
/// <param name="length">The length (amount of bytes to copy).</param>
|
||||
[Obsolete("Use MemoryCopy with long length and source/destination swapped to match C++ API.")]
|
||||
[Obsolete("Use MemoryCopy with long length and source/destination parameters swapped instead")]
|
||||
public static void MemoryCopy(IntPtr source, IntPtr destination, int length)
|
||||
{
|
||||
// [Deprecated on 30.05.2021, expires on 30.05.2022]
|
||||
|
||||
Reference in New Issue
Block a user