|
|
|
|
|
|
using UnityEngine.Experimental.Perception.Randomization.Randomizers; |
|
|
|
using UnityEngine.Experimental.Perception.Randomization.Samplers; |
|
|
|
using UnityEngine.Perception.GroundTruth; |
|
|
|
using UnityEngine.Rendering; |
|
|
|
|
|
|
|
namespace UnityEngine.Experimental.Perception.Randomization.Scenarios |
|
|
|
{ |
|
|
|
|
|
|
bool m_SkipFrame = true; |
|
|
|
bool m_FirstScenarioFrame = true; |
|
|
|
bool m_WaitingForFinalUploads; |
|
|
|
RandomizerTagManager m_TagManager = new RandomizerTagManager(); |
|
|
|
|
|
|
|
IEnumerable<Randomizer> activeRandomizers |
|
|
|
{ |
|
|
|
|
|
|
|
|
|
|
// ReSharper disable once InconsistentNaming
|
|
|
|
[SerializeReference] internal List<Randomizer> m_Randomizers = new List<Randomizer>(); |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// The RandomizerTagManager attached to this scenario
|
|
|
|
/// </summary>
|
|
|
|
public RandomizerTagManager tagManager => m_TagManager; |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Return the list of randomizers attached to this scenario
|
|
|
|
|
|
|
// Don't skip the first frame if executing on Unity Simulation
|
|
|
|
if (Configuration.Instance.IsSimulationRunningInCloud()) |
|
|
|
m_SkipFrame = false; |
|
|
|
} |
|
|
|
|
|
|
|
void OnEnable() |
|
|
|
{ |
|
|
|
activeScenario = this; |
|
|
|
} |
|
|
|
|
|
|
|
void OnDisable() |
|
|
|
{ |
|
|
|
activeScenario = null; |
|
|
|
} |
|
|
|
|
|
|
|
void Start() |
|
|
|