Skip to content

Commit

Permalink
Make fully 2019 compatible
Browse files Browse the repository at this point in the history
  • Loading branch information
Happyrobot33 committed Feb 15, 2024
1 parent b512503 commit 0be0953
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public Doc(string assemblyName, string dllPath, int creationTick)
public XmlDocument Generate()
{
//create a new xml doc
XmlDocument xmldoc = new();
XmlDocument xmldoc = new XmlDocument();

//populate it with the base information
XmlNode doc = xmldoc.CreateElement("doc");
Expand Down
12 changes: 6 additions & 6 deletions Packages/com.happyrobot33.vrcsdkdocumentation/Editor/Injector.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public static string OnGeneratedCSProject(string path, string content)
if (SettingsObject.GetSerializedSettings().FindProperty("m_minifyDocumentation").boolValue)
{
//Setup the xml writer settings to minify, keeping whitespace but removing newlines
settings = new()
settings = new XmlWriterSettings
{
Indent = false,
NewLineChars = "",
Expand All @@ -44,7 +44,7 @@ public static string OnGeneratedCSProject(string path, string content)
else
{
//Setup the xml writer settings to be indented
settings = new()
settings = new XmlWriterSettings
{
Indent = true,
NewLineChars = "\n",
Expand All @@ -57,7 +57,7 @@ public static string OnGeneratedCSProject(string path, string content)
const string basePackagePath = "Packages/com.happyrobot33.vrcsdkdocumentation";

//parse the xml
XmlDocument xmlDoc = new();
XmlDocument xmlDoc = new XmlDocument();
xmlDoc.LoadXml(content);

//get the include item groups, which are under the Project node
Expand Down Expand Up @@ -98,7 +98,7 @@ public static string OnGeneratedCSProject(string path, string content)
}
}
//make sure no excludes are in the paths to check
PathsToCheck.RemoveAll((string path) => PathsChecked.Contains(path));
PathsToCheck.RemoveAll((string p) => PathsChecked.Contains(p));

foreach (string includePath in PathsToCheck)
{
Expand Down Expand Up @@ -126,7 +126,7 @@ public static string OnGeneratedCSProject(string path, string content)
if (System.IO.File.Exists(xmlPath))
{
//load the xml to do a quick check on the tick count
XmlDocument xml = new();
XmlDocument xml = new XmlDocument();
xml.Load(xmlPath);
//check if the tick count matches
XmlNode tickNode = xml.SelectSingleNode("doc/tick");
Expand All @@ -151,7 +151,7 @@ public static string OnGeneratedCSProject(string path, string content)
if (SettingsObject.GetSerializedSettings().FindProperty("m_generateDocumentation").boolValue)
{
//create a new doc object
Doc newDoc = new(assemblyName, assemblyPath, s_startTick);
Doc newDoc = new Doc(assemblyName, assemblyPath, s_startTick);

//now loop over the files in the folder, and add them to the doc object
string[] files = System.IO.Directory.GetFiles(basePackagePath + "/Editor/Documentation/" + assemblyName, "*.xml");
Expand Down
2 changes: 1 addition & 1 deletion Packages/com.happyrobot33.vrcsdkdocumentation/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "com.happyrobot33.vrcsdkdocumentation",
"displayName": "VRChat SDK Documentation Project",
"version": "0.0.1",
"version": "0.0.2",
"unity": "2019.4",
"description": "This package provides automatic documentation for the VRChat SDK and UdonSharp.",
"author": {
Expand Down

0 comments on commit 0be0953

Please sign in to comment.