- Home /
Can I make my own Metafiles and script assembly?
Hi everyone!
Im building a pipeline that creates scripts for gameobjects I place inside a unity scene. At the current stage of the pipeline, Im able to create the a scene with gameobjects that have a script component. The scripts have metafiles, but for some reason the gameobject does not find the script and instead shows a "Missing or invalid script" warning from once I open the editor. If I drag-N-drop my script on to the component the game works as intended. I believe this is due to the scripts and their metafile info is not being added to the /Library. Is there someway to add them to the library externally? Editing metafiles or config files? Can I use somekind of command at CLI level like "Unity.exe -batchmode -recompileAllScriptsAndPutThemInTheLibrary"?
Thanks in advance for your help
This is a duplicate of
https://answers.unity.com/questions/938256/can-i-generate-meta-files-by-myself.html
Answer by lnz611 · Mar 19 at 01:47 PM
I managed to solve it myself by generating the metafiles manually using GUIDs that ensure there will be no collisions using a relatively simple Scala script. Assets, Scenes and their respective metafiles are relatively simple even though it might appear complicated at first glance, but follows a nice YAML structure and is easy to do once you get it. However, with things such as C# scripts you have to be careful as they will need script assemblies. If anyone else comes by this post wondering how to do it feel free to contact me
Your answer
![](https://koobas.hobune.stream/wayback/20220613054007im_/https://answers.unity.com/themes/thub/images/avi.jpg)