浏览代码
Merge branch 'generic-asset-sources' of https://github.com/Unity-Technologies/com.unity.perception into generic-asset-sources
/generic-asset-sources
Merge branch 'generic-asset-sources' of https://github.com/Unity-Technologies/com.unity.perception into generic-asset-sources
/generic-asset-sources
Jon Hogins
4 年前
当前提交
d6bc212c
共有 31 个文件被更改,包括 1539 次插入 和 213 次删除
-
2com.unity.perception/CHANGELOG.md
-
35com.unity.perception/Documentation~/GroundTruthLabeling.md
-
7com.unity.perception/Documentation~/Randomization/Index.md
-
7com.unity.perception/Editor/Randomization/Editors/ScenarioBaseEditor.cs
-
4com.unity.perception/Editor/Randomization/Utilities/StaticData.cs
-
6com.unity.perception/Editor/Randomization/Uxml/AssetSource/AssetSourceElement.uxml
-
7com.unity.perception/Editor/Randomization/Uxml/ScenarioBaseElement.uxml
-
50com.unity.perception/Editor/Randomization/VisualElements/AssetSource/AssetSourceElement.cs
-
39com.unity.perception/Runtime/GroundTruth/Labelers/CameraLabeler.cs
-
43com.unity.perception/Runtime/Randomization/Randomizers/AssetSources/AssetSource.cs
-
6com.unity.perception/Runtime/Randomization/Randomizers/AssetSources/AssetSourceLocation.cs
-
4com.unity.perception/Runtime/Randomization/Randomizers/AssetSources/LocalAssetSourceLocation.cs
-
79com.unity.perception/Runtime/Randomization/Scenarios/ScenarioBase.cs
-
38com.unity.perception/Runtime/Randomization/Scenarios/Serialization/ScenarioSerializer.cs
-
16com.unity.perception/Runtime/Randomization/Scenarios/UnitySimulationScenario.cs
-
1com.unity.perception/Tests/Runtime/Randomization/ScenarioTests/Resources/SampleScenarioConfiguration.json
-
4com.unity.perception/Tests/Runtime/Randomization/ScenarioTests/ScenarioTests.cs
-
994com.unity.perception/Documentation~/Randomization/Images/randomization_uml.png
-
250com.unity.perception/Documentation~/images/labeling_uml.png
-
16com.unity.perception/Runtime/Randomization/Randomizers/AssetSources/AssetRole.cs
-
11com.unity.perception/Runtime/Randomization/Randomizers/AssetSources/AssetRole.cs.meta
-
15com.unity.perception/Runtime/Randomization/Randomizers/AssetSources/AssetRoleBase.cs
-
11com.unity.perception/Runtime/Randomization/Randomizers/AssetSources/AssetRoleBase.cs.meta
-
8com.unity.perception/Tests/Runtime/Randomization/AssetSourceTests.meta
-
51com.unity.perception/Tests/Runtime/Randomization/AssetSourceTests/LocalAssetSourceTests.cs
-
11com.unity.perception/Tests/Runtime/Randomization/AssetSourceTests/LocalAssetSourceTests.cs.meta
-
16com.unity.perception/Runtime/Randomization/Randomizers/AssetSources/Archetype.cs
-
3com.unity.perception/Runtime/Randomization/Randomizers/AssetSources/Archetype.cs.meta
-
15com.unity.perception/Runtime/Randomization/Randomizers/AssetSources/ArchetypeBase.cs
-
3com.unity.perception/Runtime/Randomization/Randomizers/AssetSources/ArchetypeBase.cs.meta
250
com.unity.perception/Documentation~/images/labeling_uml.png
文件差异内容过多而无法显示
查看文件
文件差异内容过多而无法显示
查看文件
|
|||
namespace UnityEngine.Perception.Randomization |
|||
{ |
|||
/// <summary>
|
|||
/// Derive this class to create a typed asset role.
|
|||
/// Typed asset roles are used to apply preprocessing steps to assets loaded from an <see cref="AssetSource{T}"/>.
|
|||
/// </summary>
|
|||
/// <typeparam name="T">The type of asset to preprocess</typeparam>
|
|||
public abstract class AssetRole<T> : AssetRoleBase where T : Object |
|||
{ |
|||
/// <summary>
|
|||
/// Perform preprocessing operations on an asset loaded from an <see cref="AssetSource{T}"/>.
|
|||
/// </summary>
|
|||
/// <param name="asset">The asset to preprocess</param>
|
|||
public abstract void Preprocess(T asset); |
|||
} |
|||
} |
|
|||
fileFormatVersion: 2 |
|||
guid: 3fce529b432e45f45bee917a2c4205b6 |
|||
MonoImporter: |
|||
externalObjects: {} |
|||
serializedVersion: 2 |
|||
defaultReferences: [] |
|||
executionOrder: 0 |
|||
icon: {instanceID: 0} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
using UnityEngine; |
|||
|
|||
namespace UnityEngine.Perception.Randomization |
|||
{ |
|||
/// <summary>
|
|||
/// The base asset role class. Derive from <see cref="AssetRole{T}"/> instead to create a new asset role.
|
|||
/// </summary>
|
|||
public abstract class AssetRoleBase |
|||
{ |
|||
/// <summary>
|
|||
/// The string label uniquely associated with this asset role
|
|||
/// </summary>
|
|||
public abstract string label { get; } |
|||
} |
|||
} |
|
|||
fileFormatVersion: 2 |
|||
guid: 1af66eeef6ffa514a8307a228b8e85f9 |
|||
MonoImporter: |
|||
externalObjects: {} |
|||
serializedVersion: 2 |
|||
defaultReferences: [] |
|||
executionOrder: 0 |
|||
icon: {instanceID: 0} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
fileFormatVersion: 2 |
|||
guid: ea8713402c0e1a946ac6af555b908641 |
|||
folderAsset: yes |
|||
DefaultImporter: |
|||
externalObjects: {} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
using NUnit.Framework; |
|||
using UnityEngine; |
|||
using UnityEngine.Perception.Randomization; |
|||
|
|||
namespace RandomizationTests.AssetSourceTests |
|||
{ |
|||
[TestFixture] |
|||
public class LocalAssetSourceTests |
|||
{ |
|||
GameObject m_TestObject; |
|||
TestBehaviour m_Behaviour; |
|||
|
|||
class TestAssetRole : AssetRole<GameObject> |
|||
{ |
|||
public override string label => "test"; |
|||
|
|||
public override void Preprocess(GameObject asset) |
|||
{ |
|||
throw new System.NotImplementedException(); |
|||
} |
|||
} |
|||
|
|||
class TestBehaviour : MonoBehaviour |
|||
{ |
|||
public AssetSource<GameObject> gameObjectSource = new AssetSource<GameObject> |
|||
{ |
|||
assetRole = null, |
|||
assetSourceLocation = new LocalAssetSourceLocation() |
|||
}; |
|||
|
|||
public AssetSource<Material> materialSource = new AssetSource<Material> |
|||
{ |
|||
assetRole = null, |
|||
assetSourceLocation = new LocalAssetSourceLocation() |
|||
}; |
|||
} |
|||
|
|||
[SetUp] |
|||
public void Setup() |
|||
{ |
|||
m_TestObject = new GameObject(); |
|||
m_Behaviour = m_TestObject.AddComponent<TestBehaviour>(); |
|||
} |
|||
|
|||
[TearDown] |
|||
public void TearDown() |
|||
{ |
|||
Object.DestroyImmediate(m_TestObject); |
|||
} |
|||
} |
|||
} |
|
|||
fileFormatVersion: 2 |
|||
guid: c7b5bdabb856bb5469fd4033fb6bda01 |
|||
MonoImporter: |
|||
externalObjects: {} |
|||
serializedVersion: 2 |
|||
defaultReferences: [] |
|||
executionOrder: 0 |
|||
icon: {instanceID: 0} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
namespace UnityEngine.Perception.Randomization |
|||
{ |
|||
/// <summary>
|
|||
/// Derive this class to create a typed Archetype.
|
|||
/// Typed Archetypes are used to apply preprocessing steps to assets loaded from an <see cref="AssetSource{T}"/>.
|
|||
/// </summary>
|
|||
/// <typeparam name="T">The type of asset to preprocess</typeparam>
|
|||
public abstract class Archetype<T> : ArchetypeBase where T : Object |
|||
{ |
|||
/// <summary>
|
|||
/// Perform preprocessing operations on an asset loaded from an <see cref="AssetSource{T}"/>.
|
|||
/// </summary>
|
|||
/// <param name="asset">The asset to preprocess</param>
|
|||
public abstract void Preprocess(T asset); |
|||
} |
|||
} |
|
|||
fileFormatVersion: 2 |
|||
guid: ffdc828eccff45728455a572d1f2b0e3 |
|||
timeCreated: 1618978426 |
|
|||
using UnityEngine; |
|||
|
|||
namespace UnityEngine.Perception.Randomization |
|||
{ |
|||
/// <summary>
|
|||
/// The base Archetype class. Derive from <see cref="AssetSource{T}"/> instead to create a new archetype.
|
|||
/// </summary>
|
|||
public abstract class ArchetypeBase |
|||
{ |
|||
/// <summary>
|
|||
/// The string label uniquely associated with this archetype
|
|||
/// </summary>
|
|||
public abstract string label { get; } |
|||
} |
|||
} |
|
|||
fileFormatVersion: 2 |
|||
guid: 88c34672b8a649439c1fd55bc201acde |
|||
timeCreated: 1619731337 |
撰写
预览
正在加载...
取消
保存
Reference in new issue