Skip to content

Commit

Permalink
Merge pull request #170 from soulgame/compile
Browse files Browse the repository at this point in the history
improve compile2dll: exclude editor related
  • Loading branch information
pangweiwei committed Mar 2, 2017
2 parents adc7fff + f689ce9 commit 331e3c8
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions Assets/Slua/Editor/LuaCodeGen.cs
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,9 @@ static public void CompileDLL()
UriBuilder uri = new UriBuilder(assem.CodeBase);
string path = Uri.UnescapeDataString(uri.Path).Replace("\\", "/");
string name = Path.GetFileNameWithoutExtension(path);
if (path.StartsWith(projectPath) || referenced.Contains(name))
// ignore dll for Editor
if ((path.StartsWith(projectPath) && !path.Contains("/Editor/") && !path.Contains("CSharp-Editor"))
|| referenced.Contains(name))
{
libraries.Add(path);
}
Expand Down Expand Up @@ -552,12 +554,12 @@ static public void CompileDLL()
Directory.CreateDirectory(GenPath);
File.Move (WrapperName, GenPath + WrapperName);
AssetDatabase.Refresh();
File.Delete(ArgumentFile);
}
else
{
Debug.LogError(error.ToString());
}
File.Delete(ArgumentFile);
}
}

static void clear(string[] paths)
Expand Down

0 comments on commit 331e3c8

Please sign in to comment.