-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Rename variables in Grid Sensor #5217
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
int[] ChannelOffsets; | ||
string m_Name; | ||
Vector3 m_CellScale; | ||
Vector3Int m_GridNum; |
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.
I explored grouping these parameters into struct. The constructer became cleaner but the code becomes much more verbose since these are used a lot everywhere. Also that brings another problem that in the struct some parameters can be changed at runtime while some cannot, and that will make it even more complicated.
So I decided to leave it as is.
@@ -37,23 +37,23 @@ public Vector3 CellScale | |||
} | |||
|
|||
[HideInInspector, SerializeField] | |||
internal Vector3Int m_GridNumSide = new Vector3Int(16, 1, 16); | |||
internal Vector3Int m_GridNum = new Vector3Int(16, 1, 16); |
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.
Could this be called GridDimensions, or GridSize? GridNum is confusing to me.
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.
I was thinking this as "number of grids" on each side. I'll change it to GridSize.
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.
Small comment about the m_GridNum
variable name, otherwise LGTM
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.
Looks good, just make sure you're keeping a rough list of API changes so that we can add them to the Migration Guide
Proposed change(s)
Renaming variables to better follow naming conventions.
Useful links (Github issues, JIRA tickets, ML-Agents forum threads etc.)
Types of change(s)
Checklist
Other comments