Skip to content
This repository was archived by the owner on Dec 5, 2024. It is now read-only.

Commit 58a35fb

Browse files
Merge branch 'master' into fixes/api
2 parents 381ae22 + be609cf commit 58a35fb

File tree

4 files changed

+24
-10
lines changed

4 files changed

+24
-10
lines changed
Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,15 @@
11
{
22
"name": "ExtensionLoader",
3-
"references": ["../../build/GitHub.UnityShim.dll"],
3+
"references": [],
4+
"optionalUnityReferences": [],
45
"includePlatforms": [
56
"Editor"
67
],
7-
"excludePlatforms": []
8+
"excludePlatforms": [],
9+
"allowUnsafeCode": false,
10+
"overrideReferences": true,
11+
"precompiledReferences": [
12+
"GitHub.UnityShim.dll"
13+
],
14+
"autoReferenced": true
815
}

src/UnityExtension/Assets/Editor/GitHub.Unity/Misc/Utility.cs

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -37,16 +37,14 @@ public static Texture2D GetIcon(string filename, string filename2x = "", bool in
3737
Texture2D texture2D = null;
3838

3939
var stream = Assembly.GetExecutingAssembly().GetManifestResourceStream("GitHub.Unity.IconsAndLogos." + filename);
40-
if (stream != null)
40+
if (stream == null)
4141
{
42-
texture2D = stream.ToTexture2D();
43-
}
44-
else
45-
{
46-
var iconPath = "Assets/Editor/GitHub.Unity/IconsAndLogos/" + filename;
47-
texture2D = AssetDatabase.LoadAssetAtPath<Texture2D>(iconPath);
42+
stream = new MemoryStream(Application.dataPath.ToNPath().Combine("Editor/GitHub.Unity/IconsAndLogos/", filename).ReadAllBytes());
4843
}
4944

45+
texture2D = stream.ToTexture2D();
46+
stream.Dispose();
47+
5048
if (texture2D != null)
5149
{
5250
texture2D.hideFlags = HideFlags.HideAndDontSave;

src/UnityExtension/Assets/Editor/UnityTests/UnityTests.asmdef

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,16 @@
33
"references": [
44
"GitHub.Unity"
55
],
6+
"optionalUnityReferences": [
7+
"TestAssemblies"
8+
],
69
"includePlatforms": [
710
"Editor"
811
],
9-
"excludePlatforms": []
12+
"excludePlatforms": [],
13+
"allowUnsafeCode": false,
14+
"overrideReferences": false,
15+
"precompiledReferences": [],
16+
"autoReferenced": true,
17+
"defineConstraints": []
1018
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
m_EditorVersion: 2018.3.2f1

0 commit comments

Comments
 (0)