Unity - Move Script-Files to other directory without reference loss

做~自己de王妃 提交于 2020-01-03 03:27:07

问题


I have to move my GameManager-Script to a higher directory, due to accessability from another script.

But if I try to move the script from one folder to another directory - all references die! And I mean like - all references from all scripts.

It would be really hard to configure all scripts again from the scratch. Its like starting from the beginning.

Here is the GameManagement-Directory (Assets->Standard Assets):

Here is the the Directory, where I have to move the "GameManagement" to (Assets):

Maybe someone knows how to move scripts without reference loss.

Thanks in advance.


回答1:


Ok guys I know what the problem was.

If you move files in Unity, make sure that you do that in the Explorer - NOT in the IDE.

Because you have to move the metadata-file with the script as well.

That worked for me.



来源:https://stackoverflow.com/questions/48737061/unity-move-script-files-to-other-directory-without-reference-loss

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!