Skip to content

Commit f4eb21d

Browse files
authored
Add upm support (#14)
* Add upm support Allow users to add this to the Packages folder for it to be used as an embedded package Users can then nicely add the repo as a submodule * Add meta files * Potential fix for assemblyPaths using their manifest name * Fallback to windows #if * Rename asmdefs * Improve finding assemblies, always search in our assembly Renamed Editor asmdef * assemblyPaths small fixes, editor gui adapted EditorGUI for the target assemblies is now just a string array. Removed code to find _allKnownAssemblies. assemblyPaths renamed to assemblyNames is now a list. By default only Assembly-CSharp and the Editor variant is targeted. The assembly containing this tool is always included so we find the attributes. * Improve UI, dropdowns, add _allKnownAssemblies back Simplified finding all assemblies, moved to RefreshAllKnownAssemblies() Unity Assemblies are ignored by default. Option to add all known assemblies. Increased refresh time to 5 seconds from 1. * Add gui headers, info box * Update README.md * Partial revert "assemblyPaths small fixes, editor gui adapted", remove UnityEditorInternal dependency Use original code to find all assemblies, use `Path.GetFileNameWithoutExtension` instead of `PathUtils.NormallizeUnityAssemblyPath`. * Use string[] for Options.assemblyNames * Changed package.json * Bug fix, disable whole gui in play mode * Revert "Use string[] for Options.assemblyNames" This reverts commit 8e1d0e3. * Bug fix, hide errors for not finding default assemblies Some project may not have any editor scripts so will always get an error as Assembly-CSharp-Editor does not exist. * Merge fixes * Review changes * Removed upm author field
1 parent edc68d8 commit f4eb21d

32 files changed

Lines changed: 425 additions & 89 deletions

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
*.meta
21
scripts/LICENSE.txt
32
*.sln
43
.vs

LICENSE.txt.meta

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,11 @@ Tool created mainly to solve old problem with reloading [native plugins](https:/
1111

1212
## Installation
1313

14-
1. Download and add unity package from [releases](https://github.com/MCpiroman/UnityNativeTool/releases), or clone this repo to your project (note that if you don't use the prebuilt package and you're willing to use [low level interface callbacks](https://docs.unity3d.com/Manual/NativePluginInterface.html), you'll need to compile the stub plugin yourself form `stubLluiPlugin.c`).
14+
1. Download and add unity package from [releases](https://github.com/MCpiroman/UnityNativeTool/releases), or clone this repo to your project
15+
16+
- Clone it into the `<Project Root>/Packages` folder to use it as a local [embedded package](https://docs.unity3d.com/Manual/upm-embed.html) with [upm](https://docs.unity3d.com/Packages/com.unity.package-manager-ui@1.8/manual/index.html).
17+
18+
- Note that if you don't use the prebuilt package and you're willing to use [low level interface callbacks](https://docs.unity3d.com/Manual/NativePluginInterface.html), you'll need to compile the stub plugin yourself from `stubLluiPlugin.c`.
1519

1620
2. In project settings, set _Api Compatibility Level_ to .NET 4.x or above.
1721
Edit > Project Settings > Player > Other Settings > Api Compatibility Level

README.md.meta

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"name": "com.mcpiroman.unity-native-tool",
3+
"displayName": "Unity Native Tool",
4+
"version": "7.1.0",
5+
"description": "Tool for unloading native DLLs in the editor. \nhttps://github.com/mcpiroman/UnityNativeTool",
6+
"keywords": [
7+
"native",
8+
"c++",
9+
"dll"
10+
],
11+
"category": "Unity",
12+
"repository": {
13+
"type": "git",
14+
"url": "https://github.com/mcpiroman/UnityNativeTool.git"
15+
}
16+
}

package.json.meta

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

scripts.meta

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

scripts/Attributes.cs.meta

Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

scripts/Detour.cs.meta

Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

scripts/DllLoadException.cs.meta

Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)