Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

API information should be version specific #81

Closed
citizenmatt opened this issue Dec 9, 2016 · 2 comments
Closed

API information should be version specific #81

citizenmatt opened this issue Dec 9, 2016 · 2 comments
Assignees

Comments

@citizenmatt
Copy link
Member

Code completion for event functions, and recognising existing event functions should be version aware, and only match or suggest types and functions that are applicable for the currently referenced Unity version.

@citizenmatt citizenmatt self-assigned this Dec 9, 2016
@citizenmatt citizenmatt added this to the v1.5 - 2016.3 support milestone Dec 9, 2016
@citizenmatt
Copy link
Member Author

This is tricky - the UnityEngine.dll and UnityEditor.dll files do not have a version. The ProjectSettings\ProjectVersion.txt file lists the version of the editor that last opened/saved/generated the project.

The only way I can see of doing this is to either a) parse the defines, looking for UNITY_X_X (e.g. UNITY_5_5). The defines are only set for the Debug configuration, and there's no guarantee of accuracy.

Alternatively, b) install a plugin into the Unity Editor that opens a socket which we can talk to from our plugin (I suspect this is how VSTU works). The editor plugin can get all the information we need - but what happens if we open the project without the editor running? Cache last known good data?

Finally, c) look for something unique in each version of UnityEngine.dll, e.g. 5.5 has a parameter for OnParticleTrigger and 5.4 doesn't. I don't like this idea.

@Silentor
Copy link

UNITY_X_X defines sets for both debug and release configurations. I think defines is a best way to get Unity version for Resharper.

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

2 participants