浏览代码

Merge pull request #116 from Unity-Technologies/serialize-sampler-seed

Uniform and normal samplers now serialize their random seeds
/main
GitHub 4 年前
当前提交
ffed87ad
共有 3 个文件被更改,包括 6 次插入6 次删除
  1. 2
      com.unity.perception/CHANGELOG.md
  2. 5
      com.unity.perception/Runtime/Randomization/Samplers/SamplerTypes/NormalSampler.cs
  3. 5
      com.unity.perception/Runtime/Randomization/Samplers/SamplerTypes/UniformSampler.cs

2
com.unity.perception/CHANGELOG.md


Expanded all Unity Simulation references from USim to Unity Simulation
Uniform and Normal samplers now serialize their random seeds
### Deprecated
### Removed

5
com.unity.perception/Runtime/Randomization/Samplers/SamplerTypes/NormalSampler.cs


[Serializable]
public struct NormalSampler : ISampler
{
Unity.Mathematics.Random m_Random;
[SerializeField, HideInInspector] Unity.Mathematics.Random m_Random;
/// <summary>
/// The mean of the normal distribution to sample from

/// <summary>
/// The base seed used to initialize this sampler's state
/// </summary>
[field: SerializeField]
public uint baseSeed { get; set; }
[field: SerializeField] public uint baseSeed { get; set; }
/// <summary>
/// The current random state of this sampler

5
com.unity.perception/Runtime/Randomization/Samplers/SamplerTypes/UniformSampler.cs


[Serializable]
public struct UniformSampler : ISampler
{
Unity.Mathematics.Random m_Random;
[SerializeField, HideInInspector] Unity.Mathematics.Random m_Random;
[field: SerializeField]
public uint baseSeed { get; set; }
[field: SerializeField] public uint baseSeed { get; set; }
/// <summary>
/// The current random state of this sampler

正在加载...
取消
保存