How to get fileID information so i can just edit Mecanim Animator through script?

First, sorry for my English. :stuck_out_tongue:

I want to edit Mecanim Animator(.controller file) through script.
But i don’t know how to get the fileID information at the State block.
Like something down below…

--- !u!1102 &110290603
  m_ObjectHideFlags: 3
  m_PrefabParentObject: {fileID: 0}
  m_PrefabInternal: {fileID: 0}
  m_Name: ready
  m_Speed: 1
  m_CycleOffset: 0
  - {fileID: 7400010, guid: 7581bf4cfb0c33a499343eaf5e2063a0, type: 3}
  m_ParentStateMachine: {fileID: 110700000}
  m_Position: {x: 348, y: -144, z: 0}
  m_IKOnFeet: 1
  m_Mirror: 0

I can get GUID of FBX file by AssetDatabase.AssetPathToGUID(), but it seems there is no way to get fileID of the animations in the FBX file.

And the result of GetHashCode() and GetInstanceID() are also seems useless.
For example, there is a animation clip which fileID is 7400026,
but GetHashCode() gave me this number >> 10140, seems no rule between them.
(but the number 74 in fileID seems like “Classes Ordered by ID Number” in Unity manual? (74 is AnimationClip))

I also look the manual : Textual Scene File Format (Pro-only Feature)
But still have no clue about how to get fileID…

Does anybody knows how to solve this?

(C# code is better xD)

I figured out that fileID is relation to the order in FBX file, and represent as even number base on zero.

For example…
there is 3 clips in the FBX file : ( ready, run, attack )
so fileID goes like : ( 7400000, 7400002, 7400004 )

That’s weird. I wonder what the first bit is being used for…