Get object/prefab name as string.

Im trying to do a map editor and when you save its saves every object x,y,z value but wanna get the first three charters on the object name for id. When i load the map im gonna check the id and spawn the prefab on the x,y,z position. example

001_BigEnemy //i wanna get 001
002_SmallEnemy //i wanna get 002

plz answer or come up with a better solution.

if you have ###-Name, you can easily do a string.split on "-" which will give you 2 strings in an array where index 0 is the ### and index 1 is the Name. Then you can do a parse on the ### from string to get a true number if you need to.