From cfefe7a24c9326da2e34f6759309319612851c9f Mon Sep 17 00:00:00 2001 From: Ruan Lucas <79365912+RuanLucasGD@users.noreply.github.com> Date: Sun, 30 Apr 2023 11:06:58 -0400 Subject: [PATCH] add == operator on Actors --- Source/Engine/Level/Actor.cs | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/Source/Engine/Level/Actor.cs b/Source/Engine/Level/Actor.cs index bd005d415..7ff6622b3 100644 --- a/Source/Engine/Level/Actor.cs +++ b/Source/Engine/Level/Actor.cs @@ -357,5 +357,27 @@ 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); + } } }