Skip to content

Commit 32b5129

Browse files
author
thinbug
committed
1
1 parent eac0111 commit 32b5129

File tree

12 files changed

+518
-0
lines changed

12 files changed

+518
-0
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
UnityCopyApp/.vs
2+
UnityCopyApp/UnityCopyApp/bin
3+
UnityCopyApp/UnityCopyApp/obj

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,11 @@
11
# UnityCopyDirDepend
22
Unity复制文件夹,并且制作新的依赖关系
3+
4+
本复制工具可以复制依赖关系
5+
6+
首先需要关闭Unity
7+
然后打开命令提示符, 输入指令, 例如下方的, 复制E:\ESCAPE\Decode\DecodeUnity\Assets\ResAll\UI:
8+
9+
E:\ESCAPE\Decode\其他\复制依赖关系>UnityCopy.exe E:\ESCAPE\Decode\DecodeUnity\Assets\ResAll\UI
10+
11+
复制完毕后会生成一个E:\ESCAPE\Decode\DecodeUnity\Assets\ResAll\UI_Copy

UnityCopyApp/UnityCopyApp.sln

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
# Visual Studio Version 17
4+
VisualStudioVersion = 17.12.35521.163 d17.12
5+
MinimumVisualStudioVersion = 10.0.40219.1
6+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UnityCopyApp", "UnityCopyApp\UnityCopyApp.csproj", "{96EB2D36-2B04-498D-8C59-3CB8D16A5634}"
7+
EndProject
8+
Global
9+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
10+
Debug|Any CPU = Debug|Any CPU
11+
Release|Any CPU = Release|Any CPU
12+
EndGlobalSection
13+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
14+
{96EB2D36-2B04-498D-8C59-3CB8D16A5634}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15+
{96EB2D36-2B04-498D-8C59-3CB8D16A5634}.Debug|Any CPU.Build.0 = Debug|Any CPU
16+
{96EB2D36-2B04-498D-8C59-3CB8D16A5634}.Release|Any CPU.ActiveCfg = Release|Any CPU
17+
{96EB2D36-2B04-498D-8C59-3CB8D16A5634}.Release|Any CPU.Build.0 = Release|Any CPU
18+
EndGlobalSection
19+
GlobalSection(SolutionProperties) = preSolution
20+
HideSolutionNode = FALSE
21+
EndGlobalSection
22+
EndGlobal
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd">
2+
<Costura IncludeRuntimeReferences="true">
3+
<!--<Unmanaged64Assemblies>
4+
5+
</Unmanaged64Assemblies>-->
6+
7+
</Costura>
8+
</Weavers>
Lines changed: 176 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,176 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
3+
<!-- This file was generated by Fody. Manual changes to this file will be lost when your project is rebuilt. -->
4+
<xs:element name="Weavers">
5+
<xs:complexType>
6+
<xs:all>
7+
<xs:element name="Costura" minOccurs="0" maxOccurs="1">
8+
<xs:complexType>
9+
<xs:all>
10+
<xs:element minOccurs="0" maxOccurs="1" name="ExcludeAssemblies" type="xs:string">
11+
<xs:annotation>
12+
<xs:documentation>A list of assembly names to exclude from the default action of "embed all Copy Local references", delimited with line breaks</xs:documentation>
13+
</xs:annotation>
14+
</xs:element>
15+
<xs:element minOccurs="0" maxOccurs="1" name="IncludeAssemblies" type="xs:string">
16+
<xs:annotation>
17+
<xs:documentation>A list of assembly names to include from the default action of "embed all Copy Local references", delimited with line breaks.</xs:documentation>
18+
</xs:annotation>
19+
</xs:element>
20+
<xs:element minOccurs="0" maxOccurs="1" name="ExcludeRuntimeAssemblies" type="xs:string">
21+
<xs:annotation>
22+
<xs:documentation>A list of runtime assembly names to exclude from the default action of "embed all Copy Local references", delimited with line breaks</xs:documentation>
23+
</xs:annotation>
24+
</xs:element>
25+
<xs:element minOccurs="0" maxOccurs="1" name="IncludeRuntimeAssemblies" type="xs:string">
26+
<xs:annotation>
27+
<xs:documentation>A list of runtime assembly names to include from the default action of "embed all Copy Local references", delimited with line breaks.</xs:documentation>
28+
</xs:annotation>
29+
</xs:element>
30+
<xs:element minOccurs="0" maxOccurs="1" name="Unmanaged32Assemblies" type="xs:string">
31+
<xs:annotation>
32+
<xs:documentation>Obsolete, use UnmanagedWinX86Assemblies instead</xs:documentation>
33+
</xs:annotation>
34+
</xs:element>
35+
<xs:element minOccurs="0" maxOccurs="1" name="UnmanagedWinX86Assemblies" type="xs:string">
36+
<xs:annotation>
37+
<xs:documentation>A list of unmanaged X86 (32 bit) assembly names to include, delimited with line breaks.</xs:documentation>
38+
</xs:annotation>
39+
</xs:element>
40+
<xs:element minOccurs="0" maxOccurs="1" name="Unmanaged64Assemblies" type="xs:string">
41+
<xs:annotation>
42+
<xs:documentation>Obsolete, use UnmanagedWinX64Assemblies instead.</xs:documentation>
43+
</xs:annotation>
44+
</xs:element>
45+
<xs:element minOccurs="0" maxOccurs="1" name="UnmanagedWinX64Assemblies" type="xs:string">
46+
<xs:annotation>
47+
<xs:documentation>A list of unmanaged X64 (64 bit) assembly names to include, delimited with line breaks.</xs:documentation>
48+
</xs:annotation>
49+
</xs:element>
50+
<xs:element minOccurs="0" maxOccurs="1" name="UnmanagedWinArm64Assemblies" type="xs:string">
51+
<xs:annotation>
52+
<xs:documentation>A list of unmanaged Arm64 (64 bit) assembly names to include, delimited with line breaks.</xs:documentation>
53+
</xs:annotation>
54+
</xs:element>
55+
<xs:element minOccurs="0" maxOccurs="1" name="PreloadOrder" type="xs:string">
56+
<xs:annotation>
57+
<xs:documentation>The order of preloaded assemblies, delimited with line breaks.</xs:documentation>
58+
</xs:annotation>
59+
</xs:element>
60+
</xs:all>
61+
<xs:attribute name="CreateTemporaryAssemblies" type="xs:boolean">
62+
<xs:annotation>
63+
<xs:documentation>This will copy embedded files to disk before loading them into memory. This is helpful for some scenarios that expected an assembly to be loaded from a physical file.</xs:documentation>
64+
</xs:annotation>
65+
</xs:attribute>
66+
<xs:attribute name="IncludeDebugSymbols" type="xs:boolean">
67+
<xs:annotation>
68+
<xs:documentation>Controls if .pdbs for reference assemblies are also embedded.</xs:documentation>
69+
</xs:annotation>
70+
</xs:attribute>
71+
<xs:attribute name="IncludeRuntimeReferences" type="xs:boolean">
72+
<xs:annotation>
73+
<xs:documentation>Controls if runtime assemblies are also embedded.</xs:documentation>
74+
</xs:annotation>
75+
</xs:attribute>
76+
<xs:attribute name="UseRuntimeReferencePaths" type="xs:boolean">
77+
<xs:annotation>
78+
<xs:documentation>Controls whether the runtime assemblies are embedded with their full path or only with their assembly name.</xs:documentation>
79+
</xs:annotation>
80+
</xs:attribute>
81+
<xs:attribute name="DisableCompression" type="xs:boolean">
82+
<xs:annotation>
83+
<xs:documentation>Embedded assemblies are compressed by default, and uncompressed when they are loaded. You can turn compression off with this option.</xs:documentation>
84+
</xs:annotation>
85+
</xs:attribute>
86+
<xs:attribute name="DisableCleanup" type="xs:boolean">
87+
<xs:annotation>
88+
<xs:documentation>As part of Costura, embedded assemblies are no longer included as part of the build. This cleanup can be turned off.</xs:documentation>
89+
</xs:annotation>
90+
</xs:attribute>
91+
<xs:attribute name="DisableEventSubscription" type="xs:boolean">
92+
<xs:annotation>
93+
<xs:documentation>The attach method no longer subscribes to the `AppDomain.AssemblyResolve` (.NET 4.x) and `AssemblyLoadContext.Resolving` (.NET 6.0+) events.</xs:documentation>
94+
</xs:annotation>
95+
</xs:attribute>
96+
<xs:attribute name="LoadAtModuleInit" type="xs:boolean">
97+
<xs:annotation>
98+
<xs:documentation>Costura by default will load as part of the module initialization. This flag disables that behavior. Make sure you call CosturaUtility.Initialize() somewhere in your code.</xs:documentation>
99+
</xs:annotation>
100+
</xs:attribute>
101+
<xs:attribute name="IgnoreSatelliteAssemblies" type="xs:boolean">
102+
<xs:annotation>
103+
<xs:documentation>Costura will by default use assemblies with a name like 'resources.dll' as a satellite resource and prepend the output path. This flag disables that behavior.</xs:documentation>
104+
</xs:annotation>
105+
</xs:attribute>
106+
<xs:attribute name="ExcludeAssemblies" type="xs:string">
107+
<xs:annotation>
108+
<xs:documentation>A list of assembly names to exclude from the default action of "embed all Copy Local references", delimited with |</xs:documentation>
109+
</xs:annotation>
110+
</xs:attribute>
111+
<xs:attribute name="IncludeAssemblies" type="xs:string">
112+
<xs:annotation>
113+
<xs:documentation>A list of assembly names to include from the default action of "embed all Copy Local references", delimited with |.</xs:documentation>
114+
</xs:annotation>
115+
</xs:attribute>
116+
<xs:attribute name="ExcludeRuntimeAssemblies" type="xs:string">
117+
<xs:annotation>
118+
<xs:documentation>A list of runtime assembly names to exclude from the default action of "embed all Copy Local references", delimited with |</xs:documentation>
119+
</xs:annotation>
120+
</xs:attribute>
121+
<xs:attribute name="IncludeRuntimeAssemblies" type="xs:string">
122+
<xs:annotation>
123+
<xs:documentation>A list of runtime assembly names to include from the default action of "embed all Copy Local references", delimited with |.</xs:documentation>
124+
</xs:annotation>
125+
</xs:attribute>
126+
<xs:attribute name="Unmanaged32Assemblies" type="xs:string">
127+
<xs:annotation>
128+
<xs:documentation>Obsolete, use UnmanagedWinX86Assemblies instead</xs:documentation>
129+
</xs:annotation>
130+
</xs:attribute>
131+
<xs:attribute name="UnmanagedWinX86Assemblies" type="xs:string">
132+
<xs:annotation>
133+
<xs:documentation>A list of unmanaged X86 (32 bit) assembly names to include, delimited with |.</xs:documentation>
134+
</xs:annotation>
135+
</xs:attribute>
136+
<xs:attribute name="Unmanaged64Assemblies" type="xs:string">
137+
<xs:annotation>
138+
<xs:documentation>Obsolete, use UnmanagedWinX64Assemblies instead</xs:documentation>
139+
</xs:annotation>
140+
</xs:attribute>
141+
<xs:attribute name="UnmanagedWinX64Assemblies" type="xs:string">
142+
<xs:annotation>
143+
<xs:documentation>A list of unmanaged X64 (64 bit) assembly names to include, delimited with |.</xs:documentation>
144+
</xs:annotation>
145+
</xs:attribute>
146+
<xs:attribute name="UnmanagedWinArm64Assemblies" type="xs:string">
147+
<xs:annotation>
148+
<xs:documentation>A list of unmanaged Arm64 (64 bit) assembly names to include, delimited with |.</xs:documentation>
149+
</xs:annotation>
150+
</xs:attribute>
151+
<xs:attribute name="PreloadOrder" type="xs:string">
152+
<xs:annotation>
153+
<xs:documentation>The order of preloaded assemblies, delimited with |.</xs:documentation>
154+
</xs:annotation>
155+
</xs:attribute>
156+
</xs:complexType>
157+
</xs:element>
158+
</xs:all>
159+
<xs:attribute name="VerifyAssembly" type="xs:boolean">
160+
<xs:annotation>
161+
<xs:documentation>'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed.</xs:documentation>
162+
</xs:annotation>
163+
</xs:attribute>
164+
<xs:attribute name="VerifyIgnoreCodes" type="xs:string">
165+
<xs:annotation>
166+
<xs:documentation>A comma-separated list of error codes that can be safely ignored in assembly verification.</xs:documentation>
167+
</xs:annotation>
168+
</xs:attribute>
169+
<xs:attribute name="GenerateXsd" type="xs:boolean">
170+
<xs:annotation>
171+
<xs:documentation>'false' to turn off automatic generation of the XML Schema file.</xs:documentation>
172+
</xs:annotation>
173+
</xs:attribute>
174+
</xs:complexType>
175+
</xs:element>
176+
</xs:schema>
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
using CopyUnityDependApp;
2+
3+
4+
namespace UnityCopyApp
5+
{
6+
internal class Program
7+
{
8+
static void Main(string[] args)
9+
{
10+
if (args.Length < 1)
11+
{
12+
Console.WriteLine($"参数为空,请输入一个路径.");
13+
return;
14+
}
15+
string sourcePath = args[0];
16+
string destinationPath = sourcePath + "_Copy";
17+
18+
if (!Directory.Exists(sourcePath))
19+
{
20+
Console.WriteLine($"{sourcePath}不是一个目录");
21+
return;
22+
}
23+
24+
var guid = System.Guid.NewGuid().ToString().Replace("-","");
25+
//var guid = GUID.Generate();
26+
Console.WriteLine($"Generated GUID: {guid}");
27+
28+
//new UnityCopy();
29+
UnityCopy.CopyDirectoryDeep(sourcePath, destinationPath);
30+
Thread.Sleep(-1);
31+
Console.WriteLine("结束");
32+
33+
}
34+
}
35+
}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!--
3+
https://go.microsoft.com/fwlink/?LinkID=208121.
4+
-->
5+
<Project>
6+
<PropertyGroup>
7+
<Configuration>Release</Configuration>
8+
<Platform>Any CPU</Platform>
9+
<PublishDir>bin\Release\net7.0\publish\win-x64\</PublishDir>
10+
<PublishProtocol>FileSystem</PublishProtocol>
11+
<_TargetId>Folder</_TargetId>
12+
<TargetFramework>net7.0</TargetFramework>
13+
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
14+
<SelfContained>true</SelfContained>
15+
<PublishSingleFile>true</PublishSingleFile>
16+
<PublishReadyToRun>true</PublishReadyToRun>
17+
<PublishTrimmed>true</PublishTrimmed>
18+
</PropertyGroup>
19+
</Project>
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!--
3+
https://go.microsoft.com/fwlink/?LinkID=208121.
4+
-->
5+
<Project>
6+
<PropertyGroup>
7+
<History>True|2024-12-10T08:59:18.4519909Z||;True|2024-12-10T16:58:42.3059548+08:00||;True|2024-12-10T16:58:29.3307935+08:00||;True|2024-12-10T16:57:53.2811125+08:00||;False|2024-12-10T16:48:13.8162604+08:00||;</History>
8+
<LastFailureDetails />
9+
</PropertyGroup>
10+
</Project>
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"profiles": {
3+
"UnityCopyApp": {
4+
"commandName": "Project",
5+
"commandLineArgs": "E:\\ESCAPE\\Decode\\DecodeUnity\\Assets\\ResScenes\\scene6\\GTYY原始文件"
6+
}
7+
}
8+
}

0 commit comments

Comments
 (0)