commit
db82661e78
@ -1,8 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: 3343c43624a31f447a1961156a2cac6e
|
|
||||||
folderAsset: yes
|
|
||||||
DefaultImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
@ -1,8 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: 07e92c78d576a8a458ce4a298eeb512d
|
|
||||||
folderAsset: yes
|
|
||||||
DefaultImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
@ -1,17 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "AsmdefHelper.SyncSolution.Editor",
|
|
||||||
"references": [
|
|
||||||
"GUID:211243abc45174c45b3a6c275ea126b9"
|
|
||||||
],
|
|
||||||
"includePlatforms": [
|
|
||||||
"Editor"
|
|
||||||
],
|
|
||||||
"excludePlatforms": [],
|
|
||||||
"allowUnsafeCode": false,
|
|
||||||
"overrideReferences": false,
|
|
||||||
"precompiledReferences": [],
|
|
||||||
"autoReferenced": true,
|
|
||||||
"defineConstraints": [],
|
|
||||||
"versionDefines": [],
|
|
||||||
"noEngineReferences": false
|
|
||||||
}
|
|
@ -1,7 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: dcfd308825181f346bc76cac8ae79330
|
|
||||||
AssemblyDefinitionImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
@ -1,57 +0,0 @@
|
|||||||
using System.Collections.Generic;
|
|
||||||
using System.IO;
|
|
||||||
using System.Linq;
|
|
||||||
using UnityEditor;
|
|
||||||
using UnityEngine;
|
|
||||||
using AsmdefHelper.UnityInternal;
|
|
||||||
|
|
||||||
// https://forum.unity.com/threads/solved-unity-not-generating-sln-file-from-assets-open-c-project.538487/
|
|
||||||
// Thank you Flexford!
|
|
||||||
namespace AsmdefHelper.SyncSolution.Editor {
|
|
||||||
public static class SyncSolutionUtilities {
|
|
||||||
|
|
||||||
[MenuItem("AsmdefHelper/Sync C# Solution", priority = 3000)]
|
|
||||||
public static void Sync() {
|
|
||||||
Sync(true);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void Sync(bool logsEnabled) {
|
|
||||||
CleanOldFiles(logsEnabled);
|
|
||||||
Call_SyncSolution(logsEnabled);
|
|
||||||
Call_SynchronizerSync(logsEnabled);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void CleanOldFiles(bool logsEnabled) {
|
|
||||||
var assetsDirectoryInfo = new DirectoryInfo(Application.dataPath);
|
|
||||||
var projectDirectoryInfo = assetsDirectoryInfo.Parent;
|
|
||||||
|
|
||||||
var files = GetFilesByExtensions(projectDirectoryInfo, "*.sln", "*.csproj");
|
|
||||||
foreach (var file in files) {
|
|
||||||
if (logsEnabled) {
|
|
||||||
Debug.Log($"Remove old solution file: {file.Name}");
|
|
||||||
}
|
|
||||||
file.Delete();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static void Call_SyncSolution(bool logsEnabled) {
|
|
||||||
if (logsEnabled) {
|
|
||||||
Debug.Log($"Coll method: SyncVS.Sync()");
|
|
||||||
}
|
|
||||||
SolutionSynchronizerWrapper.SyncSolution();
|
|
||||||
}
|
|
||||||
|
|
||||||
static void Call_SynchronizerSync(bool logsEnabled) {
|
|
||||||
if (logsEnabled) {
|
|
||||||
Debug.Log($"Coll method: SyncVS.Synchronizer.Sync()");
|
|
||||||
}
|
|
||||||
SolutionSynchronizerWrapper.SynchronizerSync();
|
|
||||||
}
|
|
||||||
|
|
||||||
static IEnumerable<FileInfo> GetFilesByExtensions(DirectoryInfo dir, params string[] extensions) {
|
|
||||||
extensions = extensions ?? new[] { "*" };
|
|
||||||
var files = Enumerable.Empty<FileInfo>();
|
|
||||||
return extensions.Aggregate(files, (current, ext) => current.Concat(dir.GetFiles(ext)));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,11 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: e5785f4c5d9ed634799d54e96aabf408
|
|
||||||
MonoImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
serializedVersion: 2
|
|
||||||
defaultReferences: []
|
|
||||||
executionOrder: 0
|
|
||||||
icon: {instanceID: 0}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
@ -1,22 +0,0 @@
|
|||||||
using UnityEditor;
|
|
||||||
using UnityEditor.VisualStudioIntegration;
|
|
||||||
|
|
||||||
namespace AsmdefHelper.UnityInternal {
|
|
||||||
public static class SolutionSynchronizerWrapper {
|
|
||||||
|
|
||||||
static readonly SolutionSynchronizer synchronizer;
|
|
||||||
|
|
||||||
static SolutionSynchronizerWrapper() {
|
|
||||||
synchronizer = SyncVS.Synchronizer;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void SyncSolution() {
|
|
||||||
SyncVS.SyncSolution();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public static void SynchronizerSync() {
|
|
||||||
synchronizer?.Sync();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,3 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: aeb995b6396143f58028eb4aa639c7c4
|
|
||||||
timeCreated: 1586952223
|
|
@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "dev.n5y.asmdefhelper",
|
"name": "dev.n5y.asmdefhelper",
|
||||||
"displayName": "AsmdefHelper",
|
"displayName": "AsmdefHelper",
|
||||||
"version": "0.4.1",
|
"version": "0.5",
|
||||||
"unity": "2019.3",
|
"unity": "2019.3",
|
||||||
"description": "Unity assembly definition utilities.",
|
"description": "Unity assembly definition utilities.",
|
||||||
"keywords": ["asmdef", "editor"],
|
"keywords": ["asmdef", "editor"],
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
{
|
{
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"com.unity.ide.rider": "2.0.7",
|
"com.unity.ide.rider": "3.0.6",
|
||||||
"com.unity.ide.visualstudio": "2.0.5",
|
"com.unity.ide.visualstudio": "2.0.7",
|
||||||
"com.unity.test-framework": "1.1.19",
|
"com.unity.test-framework": "1.1.24",
|
||||||
"com.unity.modules.ai": "1.0.0",
|
"com.unity.modules.ai": "1.0.0",
|
||||||
"com.unity.modules.androidjni": "1.0.0",
|
"com.unity.modules.androidjni": "1.0.0",
|
||||||
"com.unity.modules.animation": "1.0.0",
|
"com.unity.modules.animation": "1.0.0",
|
||||||
|
@ -1,34 +1,36 @@
|
|||||||
{
|
{
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"com.unity.ext.nunit": {
|
"com.unity.ext.nunit": {
|
||||||
"version": "1.0.5",
|
"version": "1.0.6",
|
||||||
"depth": 1,
|
"depth": 1,
|
||||||
"source": "registry",
|
"source": "registry",
|
||||||
"dependencies": {},
|
"dependencies": {},
|
||||||
"url": "https://packages.unity.com"
|
"url": "https://packages.unity.com"
|
||||||
},
|
},
|
||||||
"com.unity.ide.rider": {
|
"com.unity.ide.rider": {
|
||||||
"version": "2.0.7",
|
"version": "3.0.6",
|
||||||
"depth": 0,
|
"depth": 0,
|
||||||
"source": "registry",
|
"source": "registry",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"com.unity.test-framework": "1.1.1"
|
"com.unity.ext.nunit": "1.0.6"
|
||||||
},
|
},
|
||||||
"url": "https://packages.unity.com"
|
"url": "https://packages.unity.com"
|
||||||
},
|
},
|
||||||
"com.unity.ide.visualstudio": {
|
"com.unity.ide.visualstudio": {
|
||||||
"version": "2.0.5",
|
"version": "2.0.7",
|
||||||
"depth": 0,
|
|
||||||
"source": "registry",
|
|
||||||
"dependencies": {},
|
|
||||||
"url": "https://packages.unity.com"
|
|
||||||
},
|
|
||||||
"com.unity.test-framework": {
|
|
||||||
"version": "1.1.19",
|
|
||||||
"depth": 0,
|
"depth": 0,
|
||||||
"source": "registry",
|
"source": "registry",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"com.unity.ext.nunit": "1.0.5",
|
"com.unity.test-framework": "1.1.9"
|
||||||
|
},
|
||||||
|
"url": "https://packages.unity.com"
|
||||||
|
},
|
||||||
|
"com.unity.test-framework": {
|
||||||
|
"version": "1.1.24",
|
||||||
|
"depth": 0,
|
||||||
|
"source": "registry",
|
||||||
|
"dependencies": {
|
||||||
|
"com.unity.ext.nunit": "1.0.6",
|
||||||
"com.unity.modules.imgui": "1.0.0",
|
"com.unity.modules.imgui": "1.0.0",
|
||||||
"com.unity.modules.jsonserialize": "1.0.0"
|
"com.unity.modules.jsonserialize": "1.0.0"
|
||||||
},
|
},
|
||||||
|
@ -1,2 +1,2 @@
|
|||||||
m_EditorVersion: 2020.2.0f1
|
m_EditorVersion: 2021.1.7f1
|
||||||
m_EditorVersionWithRevision: 2020.2.0f1 (3721df5a8b28)
|
m_EditorVersionWithRevision: 2021.1.7f1 (d91830b65d9b)
|
||||||
|
11
README.md
11
README.md
@ -32,15 +32,6 @@ Open multiple assembly definition inspector views for parallel editing.
|
|||||||
|
|
||||||
<img src="https://user-images.githubusercontent.com/15327448/79342775-813ff480-7f68-11ea-851d-3e93b5948c0b.gif" width="450" />
|
<img src="https://user-images.githubusercontent.com/15327448/79342775-813ff480-7f68-11ea-851d-3e93b5948c0b.gif" width="450" />
|
||||||
|
|
||||||
## Sync Solution
|
|
||||||
|
|
||||||
Refresh .sln/.csproj in your project.
|
|
||||||
|
|
||||||
(menu) > [AsmdefHelper] > [Sync C# Solution]
|
|
||||||
|
|
||||||
I referred to this: [[SOLVED] Unity not generating .sln file from Assets > Open C# Project
|
|
||||||
](https://forum.unity.com/threads/solved-unity-not-generating-sln-file-from-assets-open-c-project.538487/)
|
|
||||||
|
|
||||||
## Compile Locker
|
## Compile Locker
|
||||||
|
|
||||||
Lock unity editor compile to edit an asmdef.
|
Lock unity editor compile to edit an asmdef.
|
||||||
@ -72,7 +63,7 @@ And you can also rename an asmdef by one action.
|
|||||||
___
|
___
|
||||||
|
|
||||||
## Environment
|
## Environment
|
||||||
Unity 2020.2.0f1
|
Unity 2021.1.7f1
|
||||||
|
|
||||||
This library use unity internal class, so may be not work (or couse build error) depending your unity vresion.
|
This library use unity internal class, so may be not work (or couse build error) depending your unity vresion.
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user