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

This commit is contained in:
Wojtek Figat
2023-05-05 11:41:32 +02:00
15 changed files with 96 additions and 16 deletions

View File

@@ -379,7 +379,7 @@ public:
}
/// <summary>
/// Gets the actor static fags.
/// Gets the actor static flags.
/// </summary>
API_PROPERTY(Attributes="NoAnimate, EditorDisplay(\"General\"), EditorOrder(-80), CustomEditorAlias(\"FlaxEditor.CustomEditors.Editors.ActorStaticFlagsEditor\")")
FORCE_INLINE StaticFlags GetStaticFlags() const

View File

@@ -98,7 +98,7 @@ API_ENUM(Attributes="Flags") enum class StaticFlags
Navigation = 1 << 3,
/// <summary>
/// Objects is fully static on the scene.
/// Object is fully static in the scene.
/// </summary>
FullyStatic = Transform | ReflectionProbe | Lightmap | Navigation,

View File

@@ -208,6 +208,42 @@ namespace FlaxEngine
return obj != null && obj.__unmanagedPtr != IntPtr.Zero;
}
/// <summary>
/// Checks whether the two objects are equal.
/// </summary>
/// <param name="left"></param>
/// <param name="right"></param>
/// <returns></returns>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static bool operator ==(Object left, Object right)
{
IntPtr leftPtr = (object)left != null ? left.__unmanagedPtr : IntPtr.Zero;
IntPtr rightPtr = (object)right != null ? right.__unmanagedPtr : IntPtr.Zero;
return leftPtr == rightPtr;
}
/// <summary>
/// Checks whether the two objects are not equal.
/// </summary>
/// <param name="left"></param>
/// <param name="right"></param>
/// <returns></returns>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static bool operator !=(Object left, Object right)
{
IntPtr leftPtr = (object)left != null ? left.__unmanagedPtr : IntPtr.Zero;
IntPtr rightPtr = (object)right != null ? right.__unmanagedPtr : IntPtr.Zero;
return leftPtr != rightPtr;
}
/// <inheritdoc />
public override bool Equals(object obj)
{
if (obj is FlaxEngine.Object o)
return o.__unmanagedPtr == __unmanagedPtr;
return false;
}
/// <summary>
/// Gets the pointer to the native object. Handles null object reference (returns zero).
/// </summary>