-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Adding a SensorName field to BufferSensor #5020
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
Adding a SensorName field to BufferSensor #5020
Conversation
/// Name of the generated <see cref="bufferSensor"/> object. | ||
/// Note that changing this at runtime does not affect how the Agent sorts the sensors. | ||
/// </summary> | ||
public string SensorName |
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.
Actually, I think all of these (name, ObservableSize, MaxNumObservables) need
- private storage
- public get/set accessors.
- a custom editor (don't let any of the fields get updated during play mode)
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.
Ok, I just found the CameraSensorComponentEditor
and I will use that as a base.
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.
Sounds good. I think this might even be simpler than CameraSensorComponentEditor, since I don't think there's anything that reasonably editable at runtime.
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.
done
@@ -98,7 +100,7 @@ public SensorCompressionType GetCompressionType() | |||
|
|||
public string GetName() | |||
{ | |||
return "BufferSensor"; | |||
return m_Name; |
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: add /// <inheritdoc/>
to this and GetCompressionType()
Proposed change(s)
Adding a SensorName field to BufferSensor in order to have more than one BufferSensor per Agent.
Modified the changelog to include the new BufferSensor (Was missing before)
Useful links (Github issues, JIRA tickets, ML-Agents forum threads etc.)
Types of change(s)
Checklist
Other comments