File tree Expand file tree Collapse file tree 1 file changed +10
-4
lines changed
Assets/JCSUnity/Scripts/Util Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -791,7 +791,11 @@ public static void DestroyImmediateAllTypeObjectInScene<T>()
791791 /// </summary>
792792 public static bool IsClone ( Object obj )
793793 {
794- return obj . name . Contains ( "(Clone)" ) ;
794+ return IsClone ( obj . name ) ;
795+ }
796+ public static bool IsClone ( string name )
797+ {
798+ return name . Contains ( "(Clone)" ) ;
795799 }
796800
797801 /// <summary>
@@ -800,9 +804,11 @@ public static bool IsClone(Object obj)
800804 /// </summary>
801805 public static string RemoveCloneString ( Object obj )
802806 {
803- obj . name = obj . name . Replace ( "(Clone)" , "" ) ;
804-
805- return obj . name ;
807+ return RemoveCloneString ( obj . name ) ;
808+ }
809+ public static string RemoveCloneString ( string name )
810+ {
811+ return name . Replace ( "(Clone)" , "" ) ;
806812 }
807813
808814 #endregion
You can’t perform that action at this time.
0 commit comments