diff --git a/Source/Engine/Level/Actor.cs b/Source/Engine/Level/Actor.cs
index 7ff6622b3..bd005d415 100644
--- a/Source/Engine/Level/Actor.cs
+++ b/Source/Engine/Level/Actor.cs
@@ -357,27 +357,5 @@ namespace FlaxEngine
{
return $"{Name} ({GetType().Name})";
}
-
- ///
- /// Check if Actors are equals
- ///
- ///
- ///
- ///
- public static bool operator ==(Actor left, Actor right)
- {
- return Object.Equals(left, right);
- }
-
- ///
- /// Check if Actors aren't equals
- ///
- ///
- ///
- ///
- public static bool operator !=(Actor left, Actor right)
- {
- return !Object.Equals(left, right);
- }
}
}
diff --git a/Source/Engine/Scripting/Object.cs b/Source/Engine/Scripting/Object.cs
index 227fe99e6..e895b8199 100644
--- a/Source/Engine/Scripting/Object.cs
+++ b/Source/Engine/Scripting/Object.cs
@@ -205,6 +205,30 @@ namespace FlaxEngine
return obj != null && obj.__unmanagedPtr != IntPtr.Zero;
}
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ public static bool operator == (Object left, Object right)
+ {
+ return Object.Equals(left, right);
+ }
+
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ public static bool operator !=(Object left, Object right)
+ {
+ return !Object.Equals(left, right);
+ }
+
///
/// Gets the pointer to the native object. Handles null object reference (returns zero).
///