Class AssemblyDefinitionInfo
This class represents an AssemblyDefinition file of a Unity project. It can be used to parse the file contents using JsonUtility.FromJson.
Inheritance
AssemblyDefinitionInfo
Assembly: cs.temp.dll.dll
public class AssemblyDefinitionInfo
Fields
Declaration
public bool allowUnsafeCode
Field Value
Declaration
public bool autoReferenced
Field Value
Declaration
public string[] defineConstraints
Field Value
Declaration
public const string EditorPlatform = "Editor"
Field Value
Declaration
public string[] excludePlatforms
Field Value
Declaration
public string[] includePlatforms
Field Value
Declaration
public string[] optionalUnityReferences
Field Value
Declaration
public bool overrideReferences
Field Value
Declaration
public const string TestAssembliesReference = "TestAssemblies"
Field Value
Properties
Gets whether this represents a built-in package that lives in Editor installation folder.
Declaration
public bool BuiltInPackage { get; }
Property Value
Gets the parent directory of the associated file, or returns the Assets folder if it's a DefaultAssembly.
Declaration
public DirectoryInfo Directory { get; }
Property Value
Type |
Description |
DirectoryInfo |
|
Gets whether the Editor platform is specified to be supported.
Declaration
public bool EditorPlatformSupported { get; }
Property Value
Gets or sets the parsed Guid of the AssemblyDefinition asset.
Declaration
public Guid Guid { get; set; }
Property Value
Gets whether this is a default assembly definition like Assembly-CSharp
Declaration
public bool IsDefaultAssembly { get; }
Property Value
Name of this assembly definition info
Declaration
public string Name { get; }
Property Value
Gets whether any non-Editor platforms are specified to be supported.
Declaration
public bool NonEditorPlatformSupported { get; }
Property Value
Gets DLL references for this assembly definition.
Declaration
public HashSet<string> PrecompiledAssemblyReferences { get; }
Property Value
Type |
Description |
HashSet<String> |
|
Gets AsmDef references for this assembly definition.
Declaration
public string[] References { get; }
Property Value
Gets whether this is marked as a TestAssembly.
Declaration
public bool TestAssembly { get; }
Property Value
Methods
Declaration
public static AssemblyDefinitionInfo GetDefaultAssemblyCSharpInfo(Assembly assembly)
Parameters
Type |
Name |
Description |
Assembly |
assembly |
The Unity assembly reference.
|
Returns
Gets the source files for this assembly definition.
Declaration
public SourceFileInfo[] GetSources()
Returns
Declaration
public static AssemblyDefinitionInfo Parse(FileInfo file, UnityProjectInfo unityProjectInfo, Assembly assembly, bool isBuiltInPackage = false)
Parameters
Type |
Name |
Description |
FileInfo |
file |
The file representing asmdef.
|
UnityProjectInfo |
unityProjectInfo |
Instance of UnityProjectInfo.
|
Assembly |
assembly |
The Unity assembly reference.
|
Boolean |
isBuiltInPackage |
True whether this asmdef lives in the editor installation folder.
|
Returns
A more readable string representation for assembly definition.
Declaration
public override string ToString()
Returns
Overrides
After it's parsed from JSON, this method should be invoked to validate some of the values and set additional properties.
Declaration
public void Validate(IEnumerable<CompilationPlatformInfo> availablePlatforms)
Parameters