Skip to content

Commit

Permalink
#Fixed-vs1.0.3
Browse files Browse the repository at this point in the history
  • Loading branch information
BelicusBr committed Aug 28, 2023
1 parent ff9f767 commit 37b1221
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## [1.0.3] - 28/08/2023
### Fixed
- Agora o arquivo `NoWar.json` é gravado na pasta raiz do projeto.
- Agora na criação do arquivo nowar os atributos `assembly` são escritos linha á linha em vez de uma só linha.
## [1.0.2] - 03/05/2023
### Fixed
- O campo privado `[t:CancellationTokenSource]NoWarning.source` foi substituido por `[t:bool]NoWarning.cancel` por provocar referencia nula inesperadamente apos fechar a janela.
Expand Down
8 changes: 4 additions & 4 deletions Editor/NoWarningWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ static void DoIt() {
//IDE0015;IDE0051>~M:NoWarningWindow.tds;
private string ContainerPath {
get {
string folderPath = Path.Combine(Application.persistentDataPath, "NoWar");
string folderPath = Path.Combine(Path.GetDirectoryName(Application.dataPath), "NoWar");
if (!Directory.Exists(folderPath))
Directory.CreateDirectory(folderPath);
return Path.Combine(folderPath, "NoWar.json");
Expand All @@ -35,7 +35,7 @@ private string ContainerPath {
private void OnEnable() {
if (!File.Exists(ContainerPath)) {
container = new NoWarningContainer();
return;
Unload();
}
container = JsonUtility.FromJson<NoWarningContainer>(File.ReadAllText(ContainerPath));
_ = EditorCoroutineUtility.StartCoroutine(GetAssembles(this), this);
Expand Down Expand Up @@ -88,9 +88,9 @@ private void CreateWarningSuppressorFile(string filePath, string suppressor) {
foreach (var item in modules) {
if (item.Contains(">")) {
string[] submodules = item.Split(new char[] { '>' }, System.StringSplitOptions.RemoveEmptyEntries);
builder.AppendFormat("[assembly: SuppressMessage(\"\", \"{0}\", Scope = \"member\", Target = \"{1}\")]", submodules[0].Trim(), submodules[1].Trim());
builder.AppendFormat("[assembly: SuppressMessage(\"\", \"{0}\", Scope = \"member\", Target = \"{1}\")]\r\n", submodules[0].Trim(), submodules[1].Trim());
} else {
builder.AppendFormat("[assembly: SuppressMessage(\"\", \"{0}\", Scope = \"module\")]", item.Trim());
builder.AppendFormat("[assembly: SuppressMessage(\"\", \"{0}\", Scope = \"module\")]\r\n", item.Trim());
}
}
byte[] bytes = Encoding.UTF8.GetBytes(builder.ToString());
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "com.cobilas.unity.warningsuppressor",
"version": "1.0.2",
"version": "1.0.3",
"description": "Supressor de avisos do editor de codigo para unity.",
"type": "tool",
"displayName": "Warning Suppressor",
Expand All @@ -19,7 +19,7 @@
"UnityPackage",
"UnityTool"
],
"author": "Cobilas CTB",
"author": "BélicusBr",
"license": "MIT",
"bugs": {
"url": "https://github.com/BelicusBr/com.cobilas.unity.warningsuppressor/issues"
Expand Down

0 comments on commit 37b1221

Please sign in to comment.