-
Notifications
You must be signed in to change notification settings - Fork 49
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
Some minor improvements #11
base: master
Are you sure you want to change the base?
Conversation
Without f6eeb84, it seems that plugins implementing |
I could have sworn that something like this was the case, but it seems like private static object PluginCheck(Type type) => new
{
GetInterface = type.GetInterface("IPlugin") != null,
AssignableFrom = typeof(IPlugin).IsAssignableFrom(type),
IsAbstract = !type.IsAbstract,
IsInterface = !type.IsInterface,
GetConstructor = type.GetConstructor(Type.EmptyTypes) != null
}; which implements all checks in both the old version ( The only thing that my code is doing slightly different is a stronger validation of So long story short, the old and the new check should both work properly with IEnhancedPlugin, as long as that interface implements IPlugin. Mine is a tad stricter about it. |
Well, it's definitely not working for me. My (near-trivial) code's at https://github.com/TBBle/SakuraClicker_NewEngine_Mod/blob/master/LogFrameworkVersionPlugin.cs and changing that Edit: To be clear, I didn't check that this pull request fixes the issue, and it's also possible I'm doing something wrong with my project setup. |
Your filter is likely wrong. You can set it to So I don't see how any of my commits would help you with that issue... or if it does, I've accidentally broken the filter mechanics. |
Ah, yeah, it's probably the extensionless name oversight. Sorry for the noise, I'll come back if there does turn out to be a real problem here. |
Since I've started digging around in the IPA code, I've decided to make a few small life improvements.
--ipa-console
command line argument to force-show the console.I've encountered a game where
Screen.fullScreen
was always true, no matter what I've done (-screen-fullscreen 0
, setting it in the settings) because the game likely sets it by itself. Therefore, even though it becomes windowed later on, I had no console - this switch is overriding the fullscreen check. Name is a bit odd to avoid collisions with any legitimate--console
command that games might use.CompositePlugin
) are also ignored. They can't be constructed, currently, and would throw an Activator exception in any case.IPlugin
, allowing inheritance.Console.WriteLine
.Since Unity now supports three major frameworks (.NET 2.0/3.5, .NET 4.6, .NET Standard 2.0), developing plugins can become a lot easier if one knows that framework is supported. The check successfully detects those three versions, but cannot differentiate between .NET 2.0 and .NET 2.0 subset, although I think that's an unlikely case. In case the version cannot be determined, or an exception occurs, there's a fallback that might not be as useful.
My Visual Studio settings might have accidentally re-formatted the code (CTRL-K, CTRL-D'd) in files that I've touched, although I've tried to minimize the impact. If it's not an issue, I'd follow up with a PR that cleans up/reformats all files in the project.