Rename the class to an external dll without losing reference to it in unionEditor

We have a visual solution with all our code, and it is completely separate from our unity project. When we create our code in the dll from visualstudio, the dll is copied to the plugins folder of the unity project, so we can use the classes from it in our unity project.

All this works fine, but the problem is that we will rename the class in our visual studio solution, rebuild the dll and return to the unity project, the link to the renamed class is lost in our scene and / or collections ...

I looked at the scene and prefab files and noticed that class references in the dll are defined as follows:

m_Script: {fileID: 698634159, guid: aa20b9c3579870b40bb96d13672546a3, type: 3}

I read on the forums that fileID is created based on the namespace and class file name, so logically, when a class is renamed, this fileID changes, and unity does not know that it needs to refer to the renamed class.

Is there a way to define hard links of some type, so the link is not lost when renaming the class? Or any other suggestions so that the links are not lost.

I also tried to include the metafile with the director in the dll, but the unity does not seem to take this metafile into account, since it always uses the dll directive along with the generated file.

+4
source share
2 answers

Unity , DLL. : DLL DLL, .

- Unity Unity . , , refactor Unity.

+1

Source: https://habr.com/ru/post/1584237/


All Articles