Skip to content

feat: Show public NetworkVariables in editor with a nice name#2308

Merged
jeffreyrainy merged 1 commit intodevelopfrom
feat/nicify-public-network-variable-names
Nov 14, 2022
Merged

feat: Show public NetworkVariables in editor with a nice name#2308
jeffreyrainy merged 1 commit intodevelopfrom
feat/nicify-public-network-variable-names

Conversation

@jeffreyrainy
Copy link
Copy Markdown
Contributor

From Slack request/suggestion:

When having a public NetworkVariable, I am assuming the inspector field is a custom drawer. Is it not using NicifyVariableName or purpose? I'd expect it to use it to format the variable name like everything else in Unity, thereby not showing the m_ and replacing underscores with spaces

@jeffreyrainy jeffreyrainy requested a review from a team as a code owner November 14, 2022 17:57
{
m_NetworkVariableNames.Add(fields[i].Name);
m_NetworkVariableFields.Add(fields[i].Name, fields[i]);
m_NetworkVariableNames.Add(ObjectNames.NicifyVariableName(fields[i].Name));
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

really? we have this public API? lol
I'd call it "Prettify" or "Beautify" as seen in the web/backend industry but OK :P

@jeffreyrainy jeffreyrainy merged commit 0b0679d into develop Nov 14, 2022
@jeffreyrainy jeffreyrainy deleted the feat/nicify-public-network-variable-names branch November 14, 2022 22:15
jakobbbb pushed a commit to GooseGirlGames/com.unity.netcode.gameobjects that referenced this pull request Feb 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants