Class DependenciesParser
- Namespace
- CodeStage.Maintainer.Core.Dependencies
- Assembly
- Build.dll
Base class for all Dependencies Parsers. Use to add your own Dependencies Parsers extensions.
public abstract class DependenciesParser : MaintainerExtension, IDependenciesParser, IMaintainerExtension
- Inheritance
-
objectDependenciesParser
- Implements
Examples
// Here is an example of how to create a custom dependencies parser to manually track dependencies
public class ExternalDependencyParser : DependenciesParser
{
public override Type Type => typeof(CustomAssetType);
public override IList<string> GetDependenciesGUIDs(AssetInfo asset)
{
var referencePath = Path.ChangeExtension(asset.Path, "mat");
var referenceGuid = AssetDatabase.AssetPathToGUID(referencePath);
if (!string.IsNullOrEmpty(referenceGuid))
return new []{referenceGuid};
Debug.LogError($"Couldn't find reference from {nameof(ExternalDependencyParser)}!");
return null;
}
}
Properties
Enabled
protected override bool Enabled { get; set; }
Property Value
- bool
Type
Parser target asset type. Return null to match all assets types.
public abstract Type Type { get; }
Property Value
- Type
Methods
GetDependenciesGUIDs(AssetInfo)
Called by Maintainer in order to get passed asset dependencies.
public abstract IList<string> GetDependenciesGUIDs(AssetInfo asset)
Parameters
assetAssetInfoAsset information.
Returns
- IList<string>
AssetDatabase GUIDs of all assets used in the target asset at the specified path.