- Home /
How Is 'fileID' Generated For Classes Inside an External DLL?
When you link to a MonoBehaviour that is inside of an external DLL, the resulting asset file refers to that particular class by a 'fileID' and the 'guid' of the external DLL. For example, a MonoBehaviour named 'a' inside of an external DLL would be show up in an asset's YAML file as:
m_Script: {fileID: -1880535464, guid: 50df42a15edf64f1caa6bfd8fd2576ef, type: 3}
Where the guid (50df42a15edf64f1caa6bfd8fd2576ef) is the GUID assigned by Unity to the external DLL file. The 'fileID', however, is constant and is based on both the class's namespace and name. However, I cannot figure out how Unity takes the namespace and class name and generates the 'fileID' field. In our project, we have moved several classes into external DLLs, which unfortunately breaks the links in all of our asset files. If we could generate that 'fileID' field, we could easily repair those broken links inside of our asset files. Could you please tell us how to generate the 'fileID' for a particular class? Thanks.
Hello, I also encountered the same problem with you, I do not know you have not solved
Answer by Lambda Knight · Jun 03, 2015 at 06:55 AM
Hey, I figured this out a while back! I posted a solution at http://forum.unity3d.com/threads/yaml-fileid-hash-function-for-dll-scripts.252075/#post-1695479
Thank you for you reply and Thank you for sharing this amazing thing! But I have a question , If I want to repair those broken links inside of our asset files, I need to change asset's YA$$anonymous$$L file ?
When I change the .meta file, unity sometimes will collapse, don't know you don't have appear this kind of circumstance?
Your answer
Follow this Question
Related Questions
How to re-serialize assets so they are stored as text? 1 Answer
Asset Serialization - what is "Mixed" 1 Answer
Custom assets give Missing (Mono Script) 0 Answers
Assistance needed with serialization, inheritance and scriptableobject 1 Answer
How to use XML Serialization to load custom asset types 3 Answers