-
Notifications
You must be signed in to change notification settings - Fork 120
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
- Reactivate Generator function in Unity 2018.4. #106
Changes from 8 commits
cc15244
0c6ad3e
0e8fe7c
ac7551e
953dc89
19ac373
e721c31
a744bb1
8e72dc9
7a8c087
3fa0b10
c38cb98
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
#if UNITY_2019_1_OR_NEWER | ||
#if UNITY_2018_4_OR_NEWER | ||
using System; | ||
using System.Collections.Generic; | ||
using System.IO; | ||
|
@@ -56,8 +56,9 @@ public void Generate(string type, string baseWritePath, bool isEquatable, List<A | |
|
||
// Recursively search for template files. TODO: Is there a better way to find and load templates? | ||
var templateSearchPath = Runtime.IsUnityAtomsRepo ? | ||
Directory.GetParent(baseWritePath).FullName : // "Packages" | ||
Directory.GetParent(Runtime.UnityAtomsCorePath).FullName : // "Packages" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I would prefer if you do it like this instead: |
||
Directory.GetParent(Application.dataPath).FullName; | ||
|
||
var templatePaths = Directory.GetFiles(templateSearchPath, "UA_Template*.txt", SearchOption.AllDirectories); | ||
var templateConditions = new List<string>(); | ||
if (isEquatable) { templateConditions.Add("EQUATABLE"); } | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,5 +26,14 @@ public static bool IsUnityAtomsRepo | |
{ | ||
get => System.Environment.CurrentDirectory.Contains("unity-atoms/Examples"); | ||
} | ||
|
||
/// <summary> | ||
/// Returns the path to Unity Atoms Core. | ||
/// Mainly used to search for Templates. | ||
/// </summary> | ||
public static string UnityAtomsCorePath | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please remove constant. See my first comment. |
||
{ | ||
get => "../Packages/Core"; | ||
} | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, but need you to revert these changes before I merge this PR (the complete file).