forked from MattRix/UnityDecompiled
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathUnityGeneratedCreatorCSharp.cs
More file actions
22 lines (18 loc) · 1001 Bytes
/
UnityGeneratedCreatorCSharp.cs
File metadata and controls
22 lines (18 loc) · 1001 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
using System;
using System.IO;
using System.Text;
internal class UnityGeneratedCreatorCSharp : UnityGeneratedCreator
{
private readonly string template = "\n// GENERATED BY UNITY\n// DO NOT MODIFY, THIS FILE WILL BE OVERWRITTEN DURING NEXT BUILD\nusing Windows.Graphics.Display;\nusing Windows.UI.ViewManagement;\n\nnamespace Unity\n{\n public class UnityGenerated\n {\n public static void SetupDisplay()\n {\n $SetupDisplay$\n }\n }\n}\n ";
internal override string[] Create(string directory)
{
string[] strArray = new string[] { "UnityGenerated.cs" };
StringBuilder builder = new StringBuilder(this.template);
string displaySetupCode = base.GetDisplaySetupCode();
builder.Replace("$SetupDisplay$", displaySetupCode);
File.WriteAllText(Path.Combine(directory, strArray[0]), builder.ToString());
return strArray;
}
protected override string IndentCodeLine() =>
"\t\t\t";
}