Actor == actor, alternative to casting?

How is the comparison made here? Is this something might present a problem in shipping build?

Any reason to not use this instead of a cast or interface?

This compare pointers if they point to the same object ( Virtual Memory Address ).
It only works if you want to check if it’s the same object.
This is common even in C++.

The actual machine code doesn’t need to worry about type because they don’t need to dereference to class’s member, method etc which need the size of class/address table and offset for dereferencing those.
They can just use the memory address directly for comparing.

1 Like

Thank you!