Skip to content

Instantly share code, notes, and snippets.

@Syy9
Created July 30, 2018 00:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Syy9/23f438eac6cbb8446f12cedd3d006987 to your computer and use it in GitHub Desktop.
Save Syy9/23f438eac6cbb8446f12cedd3d006987 to your computer and use it in GitHub Desktop.
How to easily output check results
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEditor;
using System.IO;
using System.Text;
public class _CheckTool {
[MenuItem("CheckTool/Check")]
public static void Check()
{
StringBuilder sb = new StringBuilder();
//TODO some check
Write(sb.ToString());
}
private static void Write(string output)
{
StreamWriter writer = new StreamWriter("Assets/result.txt", false);
writer.Write(output);
writer.Close();
Debug.Log(output);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment