-
Notifications
You must be signed in to change notification settings - Fork 4.3k
RaycastPerceptionComponent custom editor #3484
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
com.unity.ml-agents/Runtime/Sensor/RayPerceptionSensorComponentBase.cs
Outdated
Show resolved
Hide resolved
[Header("3D Properties", order = 100)] | ||
[HideInInspector] | ||
[SerializeField] | ||
[FormerlySerializedAs("startVerticalOffset")] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: attributes should go on the same line if they fit.
|
||
//[HideInInspector] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: remove
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will do. I'm not quite clear why we have this in the first place for things like this:
ml-agents/com.unity.ml-agents/Runtime/Policy/BehaviorParameters.cs
Lines 35 to 37 in 9450d3f
[HideInInspector] | |
[SerializeField] | |
string m_BehaviorName = "My Behavior"; |
but then expose it in the editor:
EditorGUILayout.PropertyField(so.FindProperty("m_BehaviorName")); |
I had to remove it here to get the list to expand properly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
Food for thought: I wonder if these would be helpful in a player build as well. 🤔
Do you mean the gizmo drawing? What's the typical setup? |
Proposed change(s)
Useful links (Github issues, JIRA tickets, ML-Agents forum threads etc.)
https://jira.unity3d.com/browse/MLA-688
https://jira.unity3d.com/browse/MLA-561
#3412
https://forum.unity.com/threads/no-visible-gizmos-for-ray-perception-sensor-component-3d.824529/
https://forum.unity.com/threads/access-rayperceptionsensor-components.823107/
Types of change(s)
Checklist
Other comments