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

Commit

Permalink
Merge branch 'master' into fixes/api
Browse files Browse the repository at this point in the history
  • Loading branch information
StanleyGoldman authored Jan 23, 2019
2 parents 381ae22 + be609cf commit 58a35fb
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 10 deletions.
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
{
"name": "ExtensionLoader",
"references": ["../../build/GitHub.UnityShim.dll"],
"references": [],
"optionalUnityReferences": [],
"includePlatforms": [
"Editor"
],
"excludePlatforms": []
"excludePlatforms": [],
"allowUnsafeCode": false,
"overrideReferences": true,
"precompiledReferences": [
"GitHub.UnityShim.dll"
],
"autoReferenced": true
}
12 changes: 5 additions & 7 deletions src/UnityExtension/Assets/Editor/GitHub.Unity/Misc/Utility.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,16 +37,14 @@ public static Texture2D GetIcon(string filename, string filename2x = "", bool in
Texture2D texture2D = null;

var stream = Assembly.GetExecutingAssembly().GetManifestResourceStream("GitHub.Unity.IconsAndLogos." + filename);
if (stream != null)
if (stream == null)
{
texture2D = stream.ToTexture2D();
}
else
{
var iconPath = "Assets/Editor/GitHub.Unity/IconsAndLogos/" + filename;
texture2D = AssetDatabase.LoadAssetAtPath<Texture2D>(iconPath);
stream = new MemoryStream(Application.dataPath.ToNPath().Combine("Editor/GitHub.Unity/IconsAndLogos/", filename).ReadAllBytes());
}

texture2D = stream.ToTexture2D();
stream.Dispose();

if (texture2D != null)
{
texture2D.hideFlags = HideFlags.HideAndDontSave;
Expand Down
10 changes: 9 additions & 1 deletion src/UnityExtension/Assets/Editor/UnityTests/UnityTests.asmdef
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,16 @@
"references": [
"GitHub.Unity"
],
"optionalUnityReferences": [
"TestAssemblies"
],
"includePlatforms": [
"Editor"
],
"excludePlatforms": []
"excludePlatforms": [],
"allowUnsafeCode": false,
"overrideReferences": false,
"precompiledReferences": [],
"autoReferenced": true,
"defineConstraints": []
}
1 change: 1 addition & 0 deletions src/UnityExtension/ProjectSettings/ProjectVersion.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
m_EditorVersion: 2018.3.2f1

0 comments on commit 58a35fb

Please sign in to comment.