The Assets
property of the AssetInspector
class provides access to an array of Editor.Asset
objects. This property is used to retrieve or set multiple assets that are being inspected within the editor environment.
The Assets
property of the AssetInspector
class provides access to an array of Editor.Asset
objects. This property is used to retrieve or set multiple assets that are being inspected within the editor environment.
Use the Assets
property when you need to work with multiple assets in the context of an asset inspector. This property allows you to get or set the array of assets that are currently being inspected.
To access the assets, simply use the property like any other array property in C#. You can iterate over the assets, modify them, or replace them as needed.
// Example of accessing the Assets property // Assume 'assetInspector' is an instance of AssetInspector Editor.Inspectors.AssetInspector assetInspector = new Editor.Inspectors.AssetInspector(); // Accessing the assets Editor.Asset[] assets = assetInspector.Assets; // Iterating over the assets foreach (var asset in assets) { // Perform operations on each asset Console.WriteLine(asset.Name); } // Setting new assets assetInspector.Assets = new Editor.Asset[] { newAsset1, newAsset2 };