Skip to content

Commit

Permalink
Decompile UnityScript assemblies in hybrid script export
Browse files Browse the repository at this point in the history
  • Loading branch information
ds5678 committed Feb 4, 2024
1 parent 3216c77 commit eac83c0
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,25 +26,22 @@ public static class ReferenceAssemblies
"Assembly-CSharp.dll",
"Assembly-CSharp",
"Assembly-CSharp-firstpass.dll",
"Assembly-CSharp-firstpass"
"Assembly-CSharp-firstpass",
"Assembly-UnityScript.dll",
"Assembly-UnityScript",
"Assembly-UnityScript-firstpass.dll",
"Assembly-UnityScript-firstpass"
};

public static bool IsPredefinedAssembly(string assemblyName)
{
if (assemblyName is null)
{
throw new ArgumentNullException(assemblyName);
}

ArgumentNullException.ThrowIfNull(assemblyName);
return predefinedAssemblies.Contains(assemblyName);
}

public static bool IsReferenceAssembly(string assemblyName)
{
if (assemblyName is null)
{
throw new ArgumentNullException(assemblyName);
}
ArgumentNullException.ThrowIfNull(assemblyName);

if (IsWhiteListAssembly(assemblyName))
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,13 @@ private void ThrowIfNotAsset(IUnityObjectBase asset)

protected static string GetScriptsFolderName(string assemblyName)
{
return assemblyName is "Assembly-CSharp-firstpass" or "Assembly - CSharp - firstpass" ? "Plugins" : "Scripts";
return assemblyName
is "Assembly-CSharp-firstpass"
or "Assembly - CSharp - firstpass"
or "Assembly-UnityScript-firstpass"
or "Assembly - UnityScript - firstpass"
? "Plugins"
: "Scripts";
}

protected static void GetExportSubPath(string assembly, string @namespace, string @class, out string folderPath, out string fileName)
Expand Down

0 comments on commit eac83c0

Please sign in to comment.