Trouble with logic for IsUnique()

I’m having trouble with the logic behind this statement

    static Dictionary<string, SavableEntity> gLookup = new Dictionary<string, SavableEntity>();

            // check to see if uID is outdated?
            if (gLookup[candidate].GetUID() != candidate)
                return true;

it seems to me like this check would cause the method to always return true so that anything with matching GUIDs would overwrite each other. What am I missing here?

Did this got solved?
I’m going to have to have a chat with the team as i keep missing the RPG questions as they get lost in the unity ones.

sorry but no. Looking at the script 3 weeks later, I’m even more confused now than I was when I posted the question.

1 Like

@sampattuzzi This one seems to be a pinch point

This would only return true if the glookup doesnt match.
Otherwise it would just pass on though.

Apologies on my last post as i think i let my irritation that i missed your question show a little. My bad!

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms