您最多选择25个主题
主题必须以中文或者字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
34 行
938 B
34 行
938 B
using System;
|
|
using System.Collections.Generic;
|
|
using System.ComponentModel;
|
|
|
|
namespace UnityEngine.Perception.Randomization
|
|
{
|
|
/// <summary>
|
|
/// A basic <see cref="AssetSourceLocation"/> for loading local project assets
|
|
/// </summary>
|
|
[Serializable]
|
|
[DisplayName("Assets In Project")]
|
|
public class LocalAssetSourceLocation : AssetSourceLocation
|
|
{
|
|
/// <summary>
|
|
/// The list of local assets available from this source
|
|
/// </summary>
|
|
public List<Object> assets = new List<Object>();
|
|
|
|
/// <inheritdoc/>
|
|
public override int count => assets.Count;
|
|
|
|
/// <inheritdoc/>
|
|
public override void Initialize<T>(AssetRole<T> assetRole) { }
|
|
|
|
/// <inheritdoc/>
|
|
public override void ReleaseAssets() { }
|
|
|
|
/// <inheritdoc/>
|
|
public override T LoadAsset<T>(int index)
|
|
{
|
|
return (T)assets[index];
|
|
}
|
|
}
|
|
}
|