Skip to content

Commit 427c66b

Browse files
committed
increased the version to 1.3.0 and added more default unity assets to check
1 parent 47c6e0f commit 427c66b

4 files changed

Lines changed: 38 additions & 9 deletions

File tree

Assets/NikosAssets/U3DHelperTools/README.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ <h3 id="unity-package-dependency">Unity Package Dependency</h3>
6565
],
6666
<span class="hljs-string">"dependencies"</span>
6767
{
68-
<span class="hljs-string">"com.nikosassets.u3dhelpertools"</span>: <span class="hljs-string">"1.2.0"</span>
68+
<span class="hljs-string">"com.nikosassets.u3dhelpertools"</span>: <span class="hljs-string">"1.3.0"</span>
6969
}
7070
}
7171
</code></pre><h3 id="unity-project">Unity Project</h3>

Assets/NikosAssets/U3DHelperTools/Scripts/Editor/GUIDHelper.cs

Lines changed: 35 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,41 @@ namespace NikosAssets.Helpers.Editor
1515
public static class GUIDHelper
1616
{
1717
/// <summary>
18-
/// Unity files that contain GUID (references)
18+
/// Unity files that contain GUID (references), feel free to add unlisted ones
1919
/// </summary>
20-
public static readonly string[] DefaultNonBinaryUnityFileExtensions =
20+
public static List<string> DefaultNonBinaryUnityFileExtensions = new List<string>()
2121
{
2222
"*.meta",
2323
"*.mat",
24-
"*.anim",
2524
"*.prefab",
2625
"*.unity",
2726
"*.asset",
28-
"*.controller"
27+
"*.manifest",
28+
"*.inputactions",
29+
"*.anim",
30+
"*.controller",
31+
"*.overrideController",
32+
"*.mask",
33+
"*.flare",
34+
"*.brush",
35+
"*.preset",
36+
"*.mixer",
37+
"*.asmdef",
38+
"*.asmref",
39+
"*.shadervariants",
40+
"*.shadergraph",
41+
"*.vfx",
42+
"*.renderTexture",
43+
"*.cubemap",
44+
"*.fontsettings",
45+
"*.spriteatlas",
46+
"*.guiskin",
47+
"*.physicMaterial",
48+
"*.physicMaterial2D",
49+
"*.signal",
50+
"*.terrainlayer",
51+
"*.playable",
52+
"*.wlt"
2953
};
3054

3155
/// <summary>
@@ -141,6 +165,11 @@ public static void SetGuids(
141165
Debug.Log("replacing GUID in: " + filePath);
142166

143167
contents = contents.Replace("guid: " + oldGuid, "guid: " + newGuid);
168+
contents = contents.Replace("guid:" + oldGuid, "guid:" + newGuid);
169+
170+
//asmdef specific
171+
contents = contents.Replace("GUID: " + oldGuid, "GUID: " + newGuid);
172+
contents = contents.Replace("GUID:" + oldGuid, "GUID:" + newGuid);
144173
}
145174

146175
File.WriteAllText(filePath + ".temp", contents);
@@ -193,7 +222,7 @@ public static void ApplyGUIDsFrom(string localPathToApply, string globalPathToRe
193222
string[] whiteListExtensions = null)
194223
{
195224
// Get the list of working files
196-
List<string> allFilesPaths = EditorUtilitiesHelper.GetFiles("", true, DefaultNonBinaryUnityFileExtensions);
225+
List<string> allFilesPaths = EditorUtilitiesHelper.GetFiles("", true, DefaultNonBinaryUnityFileExtensions.ToArray());
197226
List<string> allGlobalFilesToRead = new List<string>();
198227
foreach (string extension in DefaultNonBinaryUnityFileExtensions)
199228
{
@@ -297,7 +326,7 @@ public static void RegenerateGuids(
297326
string[] whiteListExtensions = null)
298327
{
299328
// Get the list of working files
300-
List<string> allFilesPaths = EditorUtilitiesHelper.GetFiles("", true, DefaultNonBinaryUnityFileExtensions);
329+
List<string> allFilesPaths = EditorUtilitiesHelper.GetFiles("", true, DefaultNonBinaryUnityFileExtensions.ToArray());
301330

302331
// Create dictionary to hold old-to-new GUID map
303332
Dictionary<string, string> guidOldToNewMap = new Dictionary<string, string>();

Assets/NikosAssets/U3DHelperTools/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "com.nikosassets.u3dhelpertools",
33
"displayName": "Unity3DHelperTools",
4-
"version": "1.2.0",
4+
"version": "1.3.0",
55
"unity": "2019.4",
66
"description": "This open-source package contains a collection of handy scripts like math algorithms (E.g. Vector & Quaternion helpers) for the Unity3D runtime environment and the Editor as well",
77
"keywords": [ "utility", "inspector", "editor", "algorithms", "helpers", "common" ],

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ Or alternatively (without git urls):
8989
],
9090
"dependencies"
9191
{
92-
"com.nikosassets.u3dhelpertools": "1.2.0"
92+
"com.nikosassets.u3dhelpertools": "1.3.0"
9393
}
9494
}
9595
```

0 commit comments

Comments
 (0)