public static abstract sealed class Editor.AssetSystem
The asset system, provides access to all the assets.
Related Guides
Broader workflow and conceptual references connected to this API.
Methods
Showing 16 methods
public static bool CanCloudInstall(Sandbox.Package package)
Is this package type something we can install?
public static Editor.Asset CreateEmbeddedAsset(Sandbox.SerializedProperty target)
Create an Asset from a serialized property. This is expected to be an embedded asset property.
public static Editor.Asset CreateResource(string type, string absoluteFilename)
Create an empty `Sandbox.GameResource`.
Parameters
type: Asset type extension for our new `Sandbox.GameResource` instance.absoluteFilename: Where to save the new `Sandbox.GameResource` instance. For example from `Editor.FileDialog`.
Returns
The new asset, or null if creation failed.
public static void DeleteOrphans()
Delete orphaned trivial children. These are things that are generated for usage by an asset, but aren't referenced by anything, so are useless.
public static Editor.Asset FindByPath(string path)
Find an asset by path.
Parameters
path: The file path to an asset. Can be absolute or relative.
public static System.Collections.Generic.IReadOnlyCollection`1<Sandbox.Package> GetInstalledPackages()
Get all packages in the download cache
public static Sandbox.Package.IRevision GetInstalledRevision(string packageIdent)
Gets the locally installed package revision by ident
public static System.Collections.Generic.IReadOnlyCollection`1<string> GetPackageFiles(Sandbox.Package package)
public static System.Collections.Generic.IReadOnlyCollection`1<Sandbox.Package> GetReferencedPackages()
Get all packages, referenced by assets in the current project, in the download cache
public static Editor.Asset RegisterFile(string absoluteFilePath)
If you just created an asset, you probably want to immediately register it
No results match this filter.
Properties
Showing 1 properties
public static System.Collections.Generic.IEnumerable`1<Editor.Asset> Editor.AssetSystem.All { get; set; }
All the assets that are being tracked by the asset system. Does not include deleted assets.
No results match this filter.
Metadata
| Field | Value |
|---|---|
| Namespace | Editor |
| Type | class |
| Assembly | Sandbox.Tools |
| Doc ID | T:Editor.AssetSystem |