Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 02 May 2006
Offline Last Active Today, 02:05 PM

#5149906 Fast GUID generator

Posted by Ocelot on 27 April 2014 - 11:56 AM

I thought about that, but object names aren't guaranteed to be unique. It's possible for two guns that have children named "foregrip" or "clip" for example. I ended up settling on patching local IDs based on an offset from the root of the hierarchy. That way my local ID links are still meaningful as long as I know the ID of the hierarchy's root.


You can hash the whole hierarchy string eg.

prefab: "starship/wing/leftgun"

object: "starship 1/wing/leftgun", "starship 2/wing/leftgun", "starship 3/wing/leftgun"

#5149495 Fast GUID generator

Posted by Ocelot on 25 April 2014 - 04:29 PM

Did you thought about hash of objects name? In all games I work on, we are using names hash for distinguish objects.

Names can be automatic eg. prefab name "sword", objects names: "sword 1", "sword 2" itd.