Author Topic: Automatically generate Unique IDs during edit time?  (Read 2498 times)

vidjogamer

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 48
    • View Profile
Automatically generate Unique IDs during edit time?
« on: January 16, 2014, 05:14:43 AM »
I just have a bunch of TNObjects in my scene. Whenever I add a new one, its ID is set to 0. Manually setting them all becomes a pain and becomes error prone. Is there a Unity Editor menu button or something that sets all TNObjects to have a unique ID?

gg67

  • Jr. Member
  • **
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 66
    • View Profile
Re: Automatically generate Unique IDs during edit time?
« Reply #1 on: January 16, 2014, 02:42:53 PM »
I'm pretty sure those are auto generated by TNet and you shouldn't need to mess with them. I haven't messed with them (unless the example project does) and everything works fine.

vidjogamer

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 48
    • View Profile
Re: Automatically generate Unique IDs during edit time?
« Reply #2 on: January 16, 2014, 03:25:10 PM »
I thought recalled it doing this on its own. But for some reason lately, all the new TNObjects have an ID of zero now. So if theres a way to fix them automatically, it would still help!

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Automatically generate Unique IDs during edit time?
« Reply #3 on: January 17, 2014, 12:44:30 AM »
Change the prefab to non-zero.

Zero means "set when TNet instantiates it". If TNet doesn't instantiate it, it should be set manually.

There is also an option to normalize TNet IDs via the menu as I recall.

vidjogamer

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 48
    • View Profile
Re: Automatically generate Unique IDs during edit time?
« Reply #4 on: January 17, 2014, 02:27:07 AM »
I thought I saw the normalize IDs menu item before, but I cant find it anymore. Do you know which menu it is in?