I have a sequence of prefabs named db00, db01, db02…
With in the dbScript, I have a dbIndex. Currently I set each by hand. IS there a way I Can access, the transform.name, and get the the number section of the object, then pass that number to an int value?
yes, you will have to do a GameObject.Find within a loop. You will be setting each dbIndex using a counter,
the same counter can be used to find the gameobject name. I suggest you remove the 00,01,02,03 and simply go by 0,1,2,3, just simpler to handle.
int i = 0;
while ( i <= maxObjectCount)
{
dbIndex[i]= GameObject.Find("db" + i);
i += 1;
}
this is C#.
Then you can access these objects by using dbIndex[value].
Edit: I might have gotten what you want to do wrong. Let me know if that is the case.
For example to do exactly what you asked would be to get the name and use TryParse