浏览代码

updated docs

/main
Steven Leal 4 年前
当前提交
94a65d8a
共有 1 个文件被更改,包括 11 次插入0 次删除
  1. 11
      com.unity.perception/Documentation~/Randomization/Parameters.md

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


After adding a public Parameter field to a Monobehavior or ScriptableObject, you may have noticed that the parameter's UI doesn't look the same as it does on when added to a Randomizer. This is because the Inspector UI for most Perception randomization components are authored using Unity's relatively new UI Elements framework, though by default, Unity uses the old IMGUI framework to render default inspector editors.
Say you have the following CustomMonoBehaviour that has a public GameObjectParameter field:
```
using UnityEngine;
using UnityEngine.Experimental.Perception.Randomization.Parameters;
public class TestestCluster : MonoBehaviour
{
public GameObjectParameter prefabs;
}
```
To force Unity to use UI Elements to render your CustomMonoBehaviour's inspector window, create a custom inspector for your Monobehaviour by deriving the DefaultUIElementsEditor class like so:
```

正在加载...
取消
保存