Skip to content
Permalink
Browse files

Initial commit & Part 0 & Part 1 completed

- Part 0: Initial Setup
- Part 1: Drawing the ‘@’ symbol and moving it around
  • Loading branch information...
iamgabrielma committed Jun 16, 2019
1 parent e161a1a commit 40361a1387a489f8444d5eaa1f992864515c8742
Showing with 4,310 additions and 0 deletions.
  1. +9 −0 Assets/Plugins.meta
  2. +9 −0 Assets/Plugins/GitHub.meta
  3. +9 −0 Assets/Plugins/GitHub/Editor.meta
  4. +3 −0 Assets/Plugins/GitHub/Editor/AsyncBridge.Net35.dll
  5. +34 −0 Assets/Plugins/GitHub/Editor/AsyncBridge.Net35.dll.meta
  6. +93 −0 Assets/Plugins/GitHub/Editor/ExtensionLoader.cs
  7. +34 −0 Assets/Plugins/GitHub/Editor/ExtensionLoader.cs.meta
  8. +3 −0 Assets/Plugins/GitHub/Editor/GitHub.Api.45.dll
  9. +33 −0 Assets/Plugins/GitHub/Editor/GitHub.Api.45.dll.meta
  10. +3 −0 Assets/Plugins/GitHub/Editor/GitHub.Api.dll
  11. +34 −0 Assets/Plugins/GitHub/Editor/GitHub.Api.dll.meta
  12. +3 −0 Assets/Plugins/GitHub/Editor/GitHub.Logging.dll
  13. +34 −0 Assets/Plugins/GitHub/Editor/GitHub.Logging.dll.meta
  14. +3 −0 Assets/Plugins/GitHub/Editor/GitHub.Unity.45.dll
  15. +33 −0 Assets/Plugins/GitHub/Editor/GitHub.Unity.45.dll.meta
  16. +3 −0 Assets/Plugins/GitHub/Editor/GitHub.Unity.dll
  17. +34 −0 Assets/Plugins/GitHub/Editor/GitHub.Unity.dll.meta
  18. +3 −0 Assets/Plugins/GitHub/Editor/GitHub.UnityShim.dll
  19. +30 −0 Assets/Plugins/GitHub/Editor/GitHub.UnityShim.dll.meta
  20. +3 −0 Assets/Plugins/GitHub/Editor/Mono.Posix.dll
  21. +34 −0 Assets/Plugins/GitHub/Editor/Mono.Posix.dll.meta
  22. BIN Assets/Plugins/GitHub/Editor/QuickGuide.pdf
  23. +8 −0 Assets/Plugins/GitHub/Editor/QuickGuide.pdf.meta
  24. +3 −0 Assets/Plugins/GitHub/Editor/ReadOnlyCollectionsInterfaces.dll
  25. +34 −0 Assets/Plugins/GitHub/Editor/ReadOnlyCollectionsInterfaces.dll.meta
  26. +3 −0 Assets/Plugins/GitHub/Editor/System.Threading.dll
  27. +34 −0 Assets/Plugins/GitHub/Editor/System.Threading.dll.meta
  28. +20 −0 Assets/Plugins/GitHub/Editor/UnityAPIWrapper.cs
  29. +11 −0 Assets/Plugins/GitHub/Editor/UnityAPIWrapper.cs.meta
  30. +3 −0 Assets/Plugins/GitHub/Editor/big-logo@2x.png
  31. +108 −0 Assets/Plugins/GitHub/Editor/big-logo@2x.png.meta
  32. +237 −0 Assets/Plugins/GitHub/Editor/credits.txt
  33. +8 −0 Assets/Plugins/GitHub/Editor/credits.txt.meta
  34. +105 −0 Assets/Plugins/GitHub/Editor/eula.txt
  35. +8 −0 Assets/Plugins/GitHub/Editor/eula.txt.meta
  36. BIN Assets/Plugins/GitHub/Editor/libsfw.bundle
  37. +106 −0 Assets/Plugins/GitHub/Editor/libsfw.bundle.meta
  38. BIN Assets/Plugins/GitHub/Editor/libsfw.so
  39. +106 −0 Assets/Plugins/GitHub/Editor/libsfw.so.meta
  40. +3 −0 Assets/Plugins/GitHub/Editor/sfw.net.dll
  41. +34 −0 Assets/Plugins/GitHub/Editor/sfw.net.dll.meta
  42. +9 −0 Assets/Plugins/GitHub/Editor/x64.meta
  43. +3 −0 Assets/Plugins/GitHub/Editor/x64/pthreadVC2.dll
  44. +165 −0 Assets/Plugins/GitHub/Editor/x64/pthreadVC2.dll.meta
  45. +3 −0 Assets/Plugins/GitHub/Editor/x64/sfw_x64.dll
  46. +165 −0 Assets/Plugins/GitHub/Editor/x64/sfw_x64.dll.meta
  47. +9 −0 Assets/Plugins/GitHub/Editor/x86.meta
  48. +3 −0 Assets/Plugins/GitHub/Editor/x86/pthreadVC2.dll
  49. +165 −0 Assets/Plugins/GitHub/Editor/x86/pthreadVC2.dll.meta
  50. +3 −0 Assets/Plugins/GitHub/Editor/x86/sfw_x86.dll
  51. +165 −0 Assets/Plugins/GitHub/Editor/x86/sfw_x86.dll.meta
  52. +8 −0 Assets/Resources.meta
  53. +8 −0 Assets/Resources/Prefabs.meta
  54. +94 −0 Assets/Resources/Prefabs/Player.prefab
  55. +7 −0 Assets/Resources/Prefabs/Player.prefab.meta
  56. +8 −0 Assets/Resources/Sprites.meta
  57. +3 −0 Assets/Resources/Sprites/player_black.png
  58. +123 −0 Assets/Resources/Sprites/player_black.png.meta
  59. +3 −0 Assets/Resources/Sprites/player_white.png
  60. +123 −0 Assets/Resources/Sprites/player_white.png.meta
  61. +8 −0 Assets/Scenes.meta
  62. +248 −0 Assets/Scenes/SampleScene.unity
  63. +7 −0 Assets/Scenes/SampleScene.unity.meta
  64. +8 −0 Assets/Scripts.meta
  65. +27 −0 Assets/Scripts/Engine.cs
  66. +11 −0 Assets/Scripts/Engine.cs.meta
  67. +71 −0 Assets/Scripts/InputHandler.cs
  68. +11 −0 Assets/Scripts/InputHandler.cs.meta
  69. +40 −0 Packages/manifest.json
  70. +17 −0 ProjectSettings/AudioManager.asset
  71. +6 −0 ProjectSettings/ClusterInputManager.asset
  72. +30 −0 ProjectSettings/DynamicsManager.asset
  73. +11 −0 ProjectSettings/EditorBuildSettings.asset
  74. +21 −0 ProjectSettings/EditorSettings.asset
  75. +57 −0 ProjectSettings/GraphicsSettings.asset
  76. +295 −0 ProjectSettings/InputManager.asset
  77. +91 −0 ProjectSettings/NavMeshAreas.asset
  78. +8 −0 ProjectSettings/NetworkManager.asset
  79. +56 −0 ProjectSettings/Physics2DSettings.asset
  80. +6 −0 ProjectSettings/PresetManager.asset
  81. +615 −0 ProjectSettings/ProjectSettings.asset
  82. +2 −0 ProjectSettings/ProjectVersion.txt
  83. +219 −0 ProjectSettings/QualitySettings.asset
  84. +43 −0 ProjectSettings/TagManager.asset
  85. +9 −0 ProjectSettings/TimeManager.asset
  86. +34 −0 ProjectSettings/UnityConnectSettings.asset
  87. +7 −0 ProjectSettings/VFXManager.asset
  88. +10 −0 ProjectSettings/XRSettings.asset

Some generated files are not rendered by default. Learn more.

Some generated files are not rendered by default. Learn more.

Some generated files are not rendered by default. Learn more.

Git LFS file not shown

Some generated files are not rendered by default. Learn more.

@@ -0,0 +1,93 @@
using UnityEditor;
using UnityEngine;
using System.IO;
using System;

namespace GitHub.Unity
{
[InitializeOnLoad]
public class ExtensionLoader : ScriptableSingleton<ExtensionLoader>
{
[SerializeField] private bool initialized = true;

public bool Initialized
{
get
{
return initialized;
}
set
{
initialized = value;
Save(true);
}
}

private static bool inSourceMode = false;
private const string sourceModePath = "Assets/Editor/build/";
private const string realPath = "Assets/Plugins/GitHub/Editor/";

private static string[] assemblies20 = { "System.Threading.dll", "AsyncBridge.Net35.dll", "ReadOnlyCollectionsInterfaces.dll", "GitHub.Api.dll", "GitHub.Unity.dll" };
private static string[] assemblies45 = { "GitHub.Api.45.dll", "GitHub.Unity.45.dll" };

private const string GITHUB_UNITY_DISABLE = "GITHUB_UNITY_DISABLE";
private static bool IsDisabled { get { return Environment.GetEnvironmentVariable(GITHUB_UNITY_DISABLE) == "1"; } }

static ExtensionLoader()
{
if (IsDisabled)
{
return;
}
EditorApplication.update += Initialize;
}

private static void Initialize()
{
EditorApplication.update -= Initialize;

// we're always doing this right now because if the plugin gets updated all the meta files will be disabled and we need to re-enable them
// we should probably detect if our assets change and re-run this instead of doing it every time
//if (!ExtensionLoader.instance.Initialized)
{
var scriptPath = Path.Combine(Application.dataPath, "Editor" + Path.DirectorySeparatorChar + "GitHub.Unity" + Path.DirectorySeparatorChar + "EntryPoint.cs");
inSourceMode = File.Exists(scriptPath);
ToggleAssemblies();
//ExtensionLoader.instance.Initialized = true;
AssetDatabase.SaveAssets();
}

}

private static void ToggleAssemblies()
{
var path = inSourceMode ? sourceModePath : realPath;
#if NET_4_6
ToggleAssemblies(path, assemblies20, false);
ToggleAssemblies(path, assemblies45, true);
#else
ToggleAssemblies(path, assemblies45, false);
ToggleAssemblies(path, assemblies20, true);
#endif
}

private static void ToggleAssemblies(string path, string[] assemblies, bool enable)
{
foreach (var file in assemblies)
{
var filepath = path + file;
PluginImporter importer = AssetImporter.GetAtPath(filepath) as PluginImporter;
if (importer == null)
{
Debug.LogFormat("GitHub for Unity: Could not find importer for {0}. Some functionality may fail.", filepath);
continue;
}
if (importer.GetCompatibleWithEditor() != enable)
{
importer.SetCompatibleWithEditor(enable);
importer.SaveAndReimport();
}
}
}
}
}

Some generated files are not rendered by default. Learn more.

Git LFS file not shown

Some generated files are not rendered by default. Learn more.

Git LFS file not shown

Some generated files are not rendered by default. Learn more.

Git LFS file not shown

Some generated files are not rendered by default. Learn more.

Git LFS file not shown

Some generated files are not rendered by default. Learn more.

Git LFS file not shown

Some generated files are not rendered by default. Learn more.

Git LFS file not shown

0 comments on commit 40361a1

Please sign in to comment.
You can’t perform that action at this time.