浏览代码

Randomizer tags can be enabled via editor (#214)

/main
GitHub 4 年前
当前提交
f8649206
共有 2 个文件被更改,包括 7 次插入4 次删除
  1. 2
      com.unity.perception/CHANGELOG.md
  2. 9
      com.unity.perception/Runtime/Randomization/Randomizers/RandomizerTag.cs

2
com.unity.perception/CHANGELOG.md


The scenario inspector buttons serialize and deserialize have been refactored to open a file explorer generate and import JSON configurations.
Randomizer tags now use OnEnable and OnDisable to manage lifecycle. This allows the user to toggle them on and off in the editor.
### Deprecated
### Removed

9
com.unity.perception/Runtime/Randomization/Randomizers/RandomizerTag.cs


RandomizerTagManager tagManager => RandomizerTagManager.singleton;
/// <summary>
/// Awake is called when this RandomizerTag is created or instantiated
/// OnEnable is called when this RandomizerTag is enabled, either created, instantiated, or enabled via
/// the Unity Editor
protected virtual void Awake()
protected void OnEnable()
/// OnDestroy is called when this RandomizerTag is destroyed
/// OnDisable is called when this RandomizerTag is disabled
protected virtual void OnDestroy()
protected virtual void OnDisable()
{
Unregister();
}

正在加载...
取消
保存