Internal Accessible Compiler
This package generates an 'internal accessible' dll.
In other words, you can internally access to other assemblies without reflection.
<< Description | Install | Usage >>
See changelog
What's new?Watch this repo
Do you want to receive notifications for new releases?Support me on GitHub!
Description
About IgnoresAccessChecksToAttribute
No InternalsVisibleTo, no problem – bypassing C# visibility rules with Roslyn
Install
Find Packages/manifest.json
in your project and edit it to look like this:
{
"dependencies": {
"com.coffee.internal-accessible-compiler": "https://github.com/mob-sakai/InternalAccessibleCompilerForUnity.git",
...
},
}
To update the package, add/change prefix #version
to the target version.
Or, use UpmGitExtension.
Requirement
- Unity 2018.3 or later
- Dot Net 2.1 or later
Usage
Compile AssemblyDefinitionFile to an 'internal accessible' dll
- Select
*.asmdef
in project view. - Click Right button and select
Internal Accessible Compiler > Setting
in context menu.
- Open
Internal Accessible Compiler Setting
and configure compile setting.
- Assembly Names To Access: Target assembly names separated by semicolons to access internally (eg. UnityEditor;UnityEditor.UI)
- OutputDllPath: Output dll path (eg. Assets/Editor/SomeAssembly.dll)
- Press
Compile
button to start compiling. After compilation, the dll will be automatically imported. - Enjoy!
Demo
A demo project that dynamically changes the text displayed in UnityEditor's title bar. (This package is used in Solution 3.) https://github.com/mob-sakai/MainWindowTitleModifierForUnity
In this class, ApplicationTitleDescriptor
, EditorApplication.updateMainWindowTitle
and EditorApplication.UpdateMainWindowTitle
are internal
elements.
However, the class accesses to them without reflection.
For more details, see this article (Japanese)
License
- MIT
Author
See Also
- GitHub page : https://github.com/mob-sakai/InternalAccessibleCompilerForUnity
- Releases : https://github.com/mob-sakai/InternalAccessibleCompilerForUnity/releases
- Issue tracker : https://github.com/mob-sakai/InternalAccessibleCompilerForUnity/issues
- Change log : https://github.com/mob-sakai/InternalAccessibleCompilerForUnity/blob/upm/CHANGELOG.md
- No InternalsVisibleTo, no problem – bypassing C# visibility rules with Roslyn
- Nuget tool version: https://www.nuget.org/packages/InternalAccessibleCompiler