Skip to content

Commit 8865d47

Browse files
authored
Merge pull request #269 from Unity-Technologies/tooltips_for_randomizers
Added tooltips to sample randomizers
2 parents 20e296e + b52a278 commit 8865d47

File tree

7 files changed

+24
-8
lines changed

7 files changed

+24
-8
lines changed

com.unity.perception/Runtime/Randomization/Randomizers/RandomizerExamples/Randomizers/BackgroundObjectPlacementRandomizer.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,26 +16,31 @@ public class BackgroundObjectPlacementRandomizer : Randomizer
1616
/// <summary>
1717
/// The Z offset component applied to all generated background layers
1818
/// </summary>
19+
[Tooltip("The Z offset applied to positions of all placed objects.")]
1920
public float depth;
2021

2122
/// <summary>
2223
/// The number of background layers to generate
2324
/// </summary>
25+
[Tooltip("The number of background layers to generate.")]
2426
public int layerCount = 2;
2527

2628
/// <summary>
2729
/// The minimum distance between placed background objects
2830
/// </summary>
31+
[Tooltip("The minimum distance between the centers of the placed objects.")]
2932
public float separationDistance = 2f;
3033

3134
/// <summary>
3235
/// The 2D size of the generated background layers
3336
/// </summary>
37+
[Tooltip("The width and height of the area in which objects will be placed. These should be positive numbers and sufficiently large in relation with the Separation Distance specified.")]
3438
public Vector2 placementArea;
3539

3640
/// <summary>
3741
/// A categorical parameter for sampling random prefabs to place
3842
/// </summary>
43+
[Tooltip("The list of Prefabs to be placed by this Randomizer.")]
3944
public GameObjectParameter prefabs;
4045

4146
GameObject m_Container;

com.unity.perception/Runtime/Randomization/Randomizers/RandomizerExamples/Randomizers/ColorRandomizer.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,9 @@ public class ColorRandomizer : Randomizer
1414
static readonly int k_BaseColor = Shader.PropertyToID("_BaseColor");
1515

1616
/// <summary>
17-
/// Describes the range of random colors to assign to tagged objects
17+
/// The range of random colors to assign to target objects
1818
/// </summary>
19+
[Tooltip("The range of random colors to assign to target objects.")]
1920
public ColorHsvaParameter colorParameter;
2021

2122
/// <summary>

com.unity.perception/Runtime/Randomization/Randomizers/RandomizerExamples/Randomizers/ForegroundObjectPlacementRandomizer.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,21 +16,25 @@ public class ForegroundObjectPlacementRandomizer : Randomizer
1616
/// <summary>
1717
/// The Z offset component applied to the generated layer of GameObjects
1818
/// </summary>
19+
[Tooltip("The Z offset applied to positions of all placed objects.")]
1920
public float depth;
2021

2122
/// <summary>
2223
/// The minimum distance between all placed objects
2324
/// </summary>
25+
[Tooltip("The minimum distance between the centers of the placed objects.")]
2426
public float separationDistance = 2f;
2527

2628
/// <summary>
2729
/// The size of the 2D area designated for object placement
2830
/// </summary>
31+
[Tooltip("The width and height of the area in which objects will be placed. These should be positive numbers and sufficiently large in relation with the Separation Distance specified.")]
2932
public Vector2 placementArea;
3033

3134
/// <summary>
3235
/// The list of prefabs sample and randomly place
3336
/// </summary>
37+
[Tooltip("The list of Prefabs to be placed by this Randomizer.")]
3438
public GameObjectParameter prefabs;
3539

3640
GameObject m_Container;

com.unity.perception/Runtime/Randomization/Randomizers/RandomizerExamples/Randomizers/HueOffsetRandomizer.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,9 @@ public class HueOffsetRandomizer : Randomizer
1515
static readonly int k_HueOffsetShaderProperty = Shader.PropertyToID("_HueOffset");
1616

1717
/// <summary>
18-
/// The range of hue offsets to assign to tagged objects
18+
/// The range of random hue offsets to assign to target objects
1919
/// </summary>
20+
[Tooltip("The range of random hue offsets to assign to target objects.")]
2021
public FloatParameter hueOffset = new FloatParameter { value = new UniformSampler(-180f, 180f) };
2122

2223
/// <summary>

com.unity.perception/Runtime/Randomization/Randomizers/RandomizerExamples/Randomizers/RotationRandomizer.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,9 @@ namespace UnityEngine.Perception.Randomization.Randomizers.SampleRandomizers
1313
public class RotationRandomizer : Randomizer
1414
{
1515
/// <summary>
16-
/// Defines the range of random rotations that can be assigned to tagged objects
16+
/// The range of random rotations to assign to target objects
1717
/// </summary>
18+
[Tooltip("The range of random rotations to assign to target objects.")]
1819
public Vector3Parameter rotation = new Vector3Parameter
1920
{
2021
x = new UniformSampler(0, 360),

com.unity.perception/Runtime/Randomization/Randomizers/RandomizerExamples/Randomizers/SunAngleRandomizer.cs

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,18 +13,21 @@ namespace UnityEngine.Perception.Randomization.Randomizers.SampleRandomizers
1313
public class SunAngleRandomizer : Randomizer
1414
{
1515
/// <summary>
16-
/// The hour of the day (0 to 24)
16+
/// The range of hours in a day (default is 0 to 24)
1717
/// </summary>
18+
[Tooltip("The range of hours in a day (default is 0 to 24).")]
1819
public FloatParameter hour = new FloatParameter { value = new UniformSampler(0, 24)};
1920

2021
/// <summary>
21-
/// The day of the year (0 being Jan 1st and 364 being December 31st)
22+
/// The range of days in a year with 0 being Jan 1st and 364 being December 31st (default is 0 to 364)
2223
/// </summary>
23-
public FloatParameter dayOfTheYear = new FloatParameter { value = new UniformSampler(0, 365)};
24+
[Tooltip("The range of days in a year with 0 being Jan 1st and 364 being December 31st (default is 0 to 364).")]
25+
public FloatParameter dayOfTheYear = new FloatParameter { value = new UniformSampler(0, 364)};
2426

2527
/// <summary>
26-
/// The earth's latitude (-90 is the south pole, 0 is the equator, and +90 is the north pole)
28+
/// The range of latitudes. A latitude of -90 is the south pole, 0 is the equator, and +90 is the north pole (default is -90 to 90).
2729
/// </summary>
30+
[Tooltip("The range of latitudes. A latitude of -90 is the south pole, 0 is the equator, and +90 is the north pole (default is -90 to 90).")]
2831
public FloatParameter latitude = new FloatParameter { value = new UniformSampler(-90, 90)};
2932

3033
/// <summary>

com.unity.perception/Runtime/Randomization/Randomizers/RandomizerExamples/Randomizers/TextureRandomizer.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,9 @@ public class TextureRandomizer : Randomizer
1818
#endif
1919

2020
/// <summary>
21-
/// The list of textures to sample and apply to tagged objects
21+
/// The list of textures to sample and apply to target objects
2222
/// </summary>
23+
[Tooltip("The list of textures to sample and apply to target objects.")]
2324
public Texture2DParameter texture;
2425

2526
/// <summary>

0 commit comments

Comments
 (0)