Hi again people. I need help once again
Is there any way to compare two objects to know if they are the instances of the same class ?
I have a class called condition which has a bunch of child
so i want to iterate an array with a ācondition childrenā, and compare with āone childā to know if the array have any instance of the same class
well, if i didnt explain well enough i will post the code as soon is i get it, but if anyone understood and can help, you have my thanks
Object first = new Object();
Object copyOfFirst = first;
Object second = new Object();
Debug.Log(string.Format("First class == Second class? {0}, copy of first class == second class? {1}, copy of first class == first class? {2}", first.Equals(second), copyOfFirst.Equals(second), first.Equals(copyOfFirst)));
exactly what i wanted to know cdevl ⦠thanks a lot =O
thanks elite and naraku =x i would have been more accurate if i had the code to post back then, but i wasnāt at work so sorry about that. But thanks for the answers anyway