Skip to content

Commit d4fb39e

Browse files
authored
Removed randomization tooling from the experimental namespace (#177)
* removed randomization tooling from the experimental namespace * removed experimental namespace from randomization docs * removed vestigial precompiled references from asmdefs * added note to parameters doc * added helpful link inside parameters doc * fixed script name * added MovedFrom attribute to randomization APIs
1 parent fec94ce commit d4fb39e

File tree

102 files changed

+320
-294
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

102 files changed

+320
-294
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ In-depth documentation on individual components of the package.
3030
|[Label Config](com.unity.perception/Documentation~/GroundTruthLabeling.md#label-config)|An asset that defines a taxonomy of labels for ground truth generation|
3131
|[Perception Camera](com.unity.perception/Documentation~/PerceptionCamera.md)|Captures RGB images and ground truth from a [Camera](https://docs.unity3d.com/Manual/class-Camera.html).|
3232
|[Dataset Capture](com.unity.perception/Documentation~/DatasetCapture.md)|Ensures sensors are triggered at proper rates and accepts data for the JSON dataset.|
33-
|[Randomization (Experimental)](com.unity.perception/Documentation~/Randomization/Index.md)|The Randomization tool set lets you integrate domain randomization principles into your simulation.|
33+
|[Randomization](com.unity.perception/Documentation~/Randomization/Index.md)|The Randomization tool set lets you integrate domain randomization principles into your simulation.|
3434

3535
## Example Projects
3636

com.unity.perception/CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,8 @@ Removed native sampling (through jobs) capability from all samplers and paramete
6969

7070
Removed `range` as a required ISampler interface property.
7171

72+
Removed randomization tooling from the "Experimental" namespace
73+
7274
### Fixed
7375

7476
Fixed an issue where the overlay panel would display a full screen semi-transparent image over the entire screen when the overlay panel is disabled in the UI
@@ -126,7 +128,6 @@ The ScenarioBase's GenerateIterativeRandomSeed() method has been renamed to Gene
126128

127129
### Fixed
128130

129-
130131
UnitySimulationScenario now correctly deserializes app-params before offsetting the current scenario iteration when executing on Unity Simulation.
131132

132133
Fixed Unity Simulation nodes generating one extra empty image before generating their share of the randomization scenario iterations.

com.unity.perception/Documentation~/Randomization/Index.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
# Overview
22

3-
*NOTE: The Perception package's randomization toolset is currently marked as experimental and is subject to change.*
4-
53
The randomization toolset simplifies randomizing aspects of generating synthetic data. It facilitates exposing parameters for randomization, offers samplers to pick random values from parameters, and provides Scenarios to coordinate a full randomization process. Each of these also allows for custom implementations to fit particular randomization needs.
64

75
#### What is Domain Randomization?

com.unity.perception/Documentation~/Randomization/Parameters.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,12 @@ All Parameters derive from the `Parameter` abstract class. Additionally, the Par
2626

2727
## Using Parameters outside of Randomizers (ie: in MonoBehaviours and ScriptableObjects)
2828

29-
After adding a public Parameter field to a MonoBehaviour or ScriptableObject, you may have noticed that the Parameter's UI doesn't look the same as it does when added to a Randomizer. This is because the Inspector UI for most Perception randomization components is authored using Unity's relatively new UI Elements framework, though by default, Unity uses the old IMGUI framework to render default inspector editors.
29+
After adding a public Parameter field to a MonoBehaviour or ScriptableObject, you may have noticed that the Parameter's UI does not look the same as it does when added to a Randomizer. This is because the Inspector UI for most Perception randomization components is authored using Unity's relatively new UI Elements framework, though by default, Unity uses the old IMGUI framework to render default inspector editors.
3030

3131
Say you have the following CustomMonoBehaviour that has a public GameObjectParameter field:
3232
```
3333
using UnityEngine;
34-
using UnityEngine.Experimental.Perception.Randomization.Parameters;
34+
using UnityEngine.Perception.Randomization.Parameters;
3535
3636
public class CustomMonoBehaviour : MonoBehaviour
3737
{
@@ -43,12 +43,14 @@ To force Unity to use UI Elements to render your CustomMonoBehaviour's inspector
4343

4444
```
4545
using UnityEditor;
46-
using UnityEngine.Experimental.Perception.Editor;
46+
using UnityEngine.Perception.Editor;
4747
4848
[CustomEditor(typeof(CustomMonoBehaviour))]
49-
public class TestClusterEditor : DefaultUIElementsEditor { }
49+
public class CustomMonoBehaviourEditor : ParameterUIElementsEditor { }
5050
```
5151

52+
**_Note_**: Any editor scripts must be placed inside an "Editor" folder within your project. "Editor" is a [special folder name](https://docs.unity3d.com/Manual/SpecialFolders.html) in Unity that prevents editor code from compiling into a player during the build process. For example, the file path for the CustomMonoBehaviourEditor script above could be ".../Assets/Scripts/Editor/CustomMonoBehaviourEditor".
53+
5254
### Categorical Parameters
5355

5456
Categorical Parameters choose a value from a list of options that have no intrinsic ordering. For example, a material Parameter randomly chooses from a list of material options, but the list of material options itself can be rearranged into any particular order without affecting the distribution of materials selected.

com.unity.perception/Documentation~/Tutorial/Phase2.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ Note that while _**Visual Studio**_ is the default option, you can choose any te
2222
```C#
2323
using System;
2424
using UnityEngine;
25-
using UnityEngine.Experimental.Perception.Randomization.Parameters;
26-
using UnityEngine.Experimental.Perception.Randomization.Randomizers;
25+
using UnityEngine.Perception.Randomization.Parameters;
26+
using UnityEngine.Perception.Randomization.Randomizers;
2727

2828
[Serializable]
2929
[AddRandomizerMenu("Perception/My Light Randomizer")]
@@ -71,7 +71,7 @@ The `OnIterationStart()` function is used for telling the Randomizer what action
7171

7272
```C#
7373
using UnityEngine;
74-
using UnityEngine.Experimental.Perception.Randomization.Randomizers;
74+
using UnityEngine.Perception.Randomization.Randomizers;
7575

7676
[AddComponentMenu("Perception/RandomizerTags/MyLightRandomizerTag")]
7777
[RequireComponent(typeof(Light))]
@@ -142,7 +142,7 @@ This makes the two lights illuminate the scene from opposing angles, each having
142142
* **:green_circle: Action**: Open `MyLightRandomizerTag.cs` and modify it to match the code below:
143143
```C#
144144
using UnityEngine;
145-
using UnityEngine.Experimental.Perception.Randomization.Randomizers;
145+
using UnityEngine.Perception.Randomization.Randomizers;
146146

147147
[AddComponentMenu("Perception/RandomizerTags/MyLightRandomizerTag")]
148148
[RequireComponent(typeof(Light))]
@@ -178,8 +178,8 @@ We also need to make a minor change to `MyLightRandomizer.cs` in order to make i
178178
```C#
179179
using System;
180180
using UnityEngine;
181-
using UnityEngine.Experimental.Perception.Randomization.Parameters;
182-
using UnityEngine.Experimental.Perception.Randomization.Randomizers;
181+
using UnityEngine.Perception.Randomization.Parameters;
182+
using UnityEngine.Perception.Randomization.Randomizers;
183183

184184
[Serializable]
185185
[AddRandomizerMenu("Perception/My Light Randomizer")]

com.unity.perception/Editor/Randomization/Editors/PerceptionEditorAnalytics.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
using JetBrains.Annotations;
33
using UnityEngine.Analytics;
44

5-
namespace UnityEditor.Experimental.Perception.Randomization
5+
namespace UnityEditor.Perception.Randomization
66
{
77
static class PerceptionEditorAnalytics
88
{

com.unity.perception/Editor/Randomization/Editors/RandomizerTagEditor.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
using UnityEditor;
22
using UnityEditor.UIElements;
3-
using UnityEngine.Experimental.Perception.Randomization.Randomizers;
3+
using UnityEngine.Perception.Randomization.Randomizers;
44
using UnityEngine.UIElements;
55

6-
namespace UnityEngine.Experimental.Perception.Randomization.Editor
6+
namespace UnityEngine.Perception.Randomization.Editor
77
{
88
[CustomEditor(typeof(RandomizerTag), true)]
99
public class RandomizerTagEditor : UnityEditor.Editor

com.unity.perception/Editor/Randomization/Editors/RunInUnitySimulationWindow.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@
99
using UnityEditor.Build.Reporting;
1010
using UnityEditor.UIElements;
1111
using UnityEngine;
12-
using UnityEngine.Experimental.Perception.Randomization.Scenarios;
12+
using UnityEngine.Perception.Randomization.Scenarios;
1313
using UnityEngine.SceneManagement;
1414
using UnityEngine.UIElements;
1515
using ZipUtility;
1616

17-
namespace UnityEditor.Experimental.Perception.Randomization
17+
namespace UnityEditor.Perception.Randomization
1818
{
1919
class RunInUnitySimulationWindow : EditorWindow
2020
{

com.unity.perception/Editor/Randomization/Editors/ScenarioBaseEditor.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
using UnityEngine;
2-
using UnityEngine.Experimental.Perception.Randomization.Scenarios;
2+
using UnityEngine.Perception.Randomization.Scenarios;
33
using UnityEngine.UIElements;
44
using Object = UnityEngine.Object;
55

6-
namespace UnityEditor.Experimental.Perception.Randomization
6+
namespace UnityEditor.Perception.Randomization
77
{
88
[CustomEditor(typeof(ScenarioBase), true)]
99
class ScenarioBaseEditor : Editor

com.unity.perception/Editor/Randomization/PropertyDrawers/ColorHsvaDrawer.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
using System;
22
using UnityEngine;
3-
using UnityEngine.Experimental.Perception.Randomization.Parameters;
3+
using UnityEngine.Perception.Randomization.Parameters;
44
using UnityEngine.UIElements;
55

6-
namespace UnityEditor.Experimental.Perception.Randomization.PropertyDrawers
6+
namespace UnityEditor.Perception.Randomization.PropertyDrawers
77
{
88
[CustomPropertyDrawer(typeof(ColorHsva), true)]
99
class ColorHsvaDrawer : PropertyDrawer

0 commit comments

Comments
 (0)