-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dll automatic copy to the Unity project unexpected behaviour / suggestions #28
Comments
I agree this is more of a "Developer" feature, which is useful for me when building new versions of agxDotNet.dll several times a day. But it still indicates that you either have the wrong AGX in PATH or PATH not set at all. We're first searching for agxDotNet.dll in the current environment and if we don't find it we check the registry for an installed version. It's important that agxDotNet.dll used in your project matches agxDotNetRuntime.dll in PATH/registry. I don't see right now doing |
About that last comment, yes!, I'm using the script you have in your readme page. But if you change the path to the new installation of AGX (I did by error), it will grab the dll from this new folder. Maybe that's what I did wrong, you are right... But I still think it would be great to have a popup or some other way to know about this beforehand instead of doing it automatically. Hopefully the rest of comments are useful! :-) Thanks |
But answering "No" in the "Would you like to update"-popup would result in wrong dll's being used. If you try to run the scene/project, Unity probably will crash due to unresolved dll dependencies. Or do you mean that the popup would tell you that "You probably made a mistake opening this project with the current environment - restart Unity with correct AGX"? It's not recommended to add AGX to global path, and it's pretty much undefined having several versions installed with one of them in the global environment. Do you have to have AGX in global path? |
No . I don't need it, sorry for mentioning it. You are right about setting the right environment for Unity beforehand, and It is ok to tell the user to watch this problem. I also detected that resetting my Library/ folder deleted the setting for .NET experimental 4.6, so I received lots of errors (namespace not found), but nothing telling me that the setting was wrong, and I spend several hours debugging why Assemblies were wrong in the project... That notification, as well as the other one, would be great. Crashes occur, sometimes, as you saw in #29 . Your idea is nice, though! |
We have several versions of AGX for several versions of Unity for several long-term projects.
I install the new version without uninstalling the previous (aware of the problems that could lead to leaving the registry values with the old values) because I want to keep the dlls of both versions.
When I open my project, I see a green log message:
New version of agxDotNet.dll located in: C:\Program Files\Algoryx\AGX-2.24.0.2\bin\x64. Copying it to current project
It detects that the version is different, deletes the new dll I copied by hand, and copies the one it thinks is the best, but not the last I installed. This is maybe a little obscure specially when you have a lot of log messages after opening a project, and this can be ignored easily, possibly breaking your project with no clue of what happened.
After this, I install the new version, uninstalling the previous. Open my project, and does nothing.
Then, I do it by hand: Go to that folder, remove the previous .dll and .meta, paste the new one and return the focus to the Unity window again and now, detects the dll, compiles, and suddenly it still detects the previous version again, not the newest, removes the dll I put by hand and copies the old one. This looks like a bug.
I have some suggestions:
[EDIT] Just a little problem with the installer. Seems that when you install a new version without uninstalling the old one (say v1 and v2), then you have v1 and v2. Then you install v2 again, it tells you to uninstall the previous one... v2... NOT v1. So v1 stays there forever. It should get rid of all older versions or leave them but update all registry and environment vars.
Copying a dll automatically is nice if your project is small and cutting edge, but not when you have several projects stalled in different versions of AGX. This should be told as an error or warning, in a different color if you will, but not do it automatically. Instead, we could have a button on the AGX menu to update the dll version. In our case, 2017.4 has a very experimental version of .Net 4, this dll update would subsequently crash Unity without changing this option. In fact, AGXUnity and AGX version pairs should be detected, and the update menu should give us the option to select which AGX version we want, including which version of AGXUnity is compatible with each. That would be really useful and less obscure, but maybe a less complicated way would be enough.
Uninstalling an AGX version shouldn't remove the .dlls needed for the projects or anyhting usable, in my opinion, so that you can keep all versions there. But that's optional.
The text was updated successfully, but these errors were encountered: