Output: Exclude root namespace by default
This commit is contained in:
@@ -51,7 +51,7 @@ namespace Il2CppInspector
|
|||||||
|
|
||||||
// Only print namespace if we're not nested
|
// Only print namespace if we're not nested
|
||||||
if (!type.IsNested)
|
if (!type.IsNested)
|
||||||
writer.Write($"{prefix}// Namespace: {type.Namespace}\n");
|
writer.Write($"{prefix}// Namespace: {(!string.IsNullOrEmpty(type.Namespace)? type.Namespace : "<default namespace>")}\n");
|
||||||
|
|
||||||
// Type declaration
|
// Type declaration
|
||||||
if (type.IsImport)
|
if (type.IsImport)
|
||||||
|
|||||||
@@ -34,7 +34,8 @@ namespace Il2CppInspector
|
|||||||
"System",
|
"System",
|
||||||
"UnityEngine",
|
"UnityEngine",
|
||||||
"Mono",
|
"Mono",
|
||||||
"Microsoft.Win32"
|
"Microsoft.Win32",
|
||||||
|
""
|
||||||
};
|
};
|
||||||
|
|
||||||
if (excludedNamespaces.Count == 1 && excludedNamespaces[0].ToLower() == "none")
|
if (excludedNamespaces.Count == 1 && excludedNamespaces[0].ToLower() == "none")
|
||||||
|
|||||||
@@ -125,7 +125,7 @@ namespace Il2CppInspector.Reflection {
|
|||||||
|
|
||||||
private string @namespace;
|
private string @namespace;
|
||||||
public string Namespace {
|
public string Namespace {
|
||||||
get => !string.IsNullOrEmpty(@namespace) ? @namespace : DeclaringType?.Namespace ?? "<default namespace>";
|
get => !string.IsNullOrEmpty(@namespace) ? @namespace : DeclaringType?.Namespace ?? "";
|
||||||
set => @namespace = value;
|
set => @namespace = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -41,11 +41,13 @@ namespace Il2CppInspector
|
|||||||
throw new Exception("Could not find any images in the IL2CPP binary");
|
throw new Exception("Could not find any images in the IL2CPP binary");
|
||||||
|
|
||||||
// Exclusions
|
// Exclusions
|
||||||
|
|
||||||
var excludedNamespaces = new List<string> {
|
var excludedNamespaces = new List<string> {
|
||||||
"System",
|
"System",
|
||||||
"UnityEngine",
|
"UnityEngine",
|
||||||
"Mono",
|
"Mono",
|
||||||
"Microsoft.Win32",
|
"Microsoft.Win32",
|
||||||
|
""
|
||||||
};
|
};
|
||||||
|
|
||||||
// Dump each image in the binary separately
|
// Dump each image in the binary separately
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ Extract types, methods, properties and fields from Unity IL2CPP binaries.
|
|||||||
* 32-bit and 64-bit support for all file formats
|
* 32-bit and 64-bit support for all file formats
|
||||||
* Supports ARMv7, Thumb-2, ARMv8 (A64), x86 and x64 architectures regardless of file format
|
* Supports ARMv7, Thumb-2, ARMv8 (A64), x86 and x64 architectures regardless of file format
|
||||||
* Supports metadata versions 16, 21, 22, 23, 24, 24.1 (Unity 2018.3+) and 24.2 (Unity 2019+) (other versions may or may not work)
|
* Supports metadata versions 16, 21, 22, 23, 24, 24.1 (Unity 2018.3+) and 24.2 (Unity 2019+) (other versions may or may not work)
|
||||||
* Support for classes, methods, constructors, fields, properties, enumerations, events, delegates, interfaces, structs and default field values
|
* Support for classes, methods, constructors, fields, properties, enumerations, events, delegates, interfaces, structs, nested types and default field values
|
||||||
* Static symbol table scanning for ELF and Mach-O binaries if present
|
* Static symbol table scanning for ELF and Mach-O binaries if present
|
||||||
* Dynamic symbol table scanning for ELF binaries if present
|
* Dynamic symbol table scanning for ELF binaries if present
|
||||||
* Symbol relocation handling for ELF binaries
|
* Symbol relocation handling for ELF binaries
|
||||||
@@ -47,6 +47,7 @@ System
|
|||||||
Mono
|
Mono
|
||||||
UnityEngine
|
UnityEngine
|
||||||
Microsoft.Win32
|
Microsoft.Win32
|
||||||
|
<the root (empty string) namespace>
|
||||||
```
|
```
|
||||||
|
|
||||||
Providing an argument to `--exclude-namespaces` will override the default list. To output all namespaces, use `--exclude-namespaces=none`.
|
Providing an argument to `--exclude-namespaces` will override the default list. To output all namespaces, use `--exclude-namespaces=none`.
|
||||||
|
|||||||
Reference in New Issue
Block a user