- Home /
What is the Equivalent of @HideInInspector In C#
I've posted a similar question for a different Javascript @ command. Now, my question fo this one is what it the equivalent/conversion of the Javascript line
@HideInInspector
In C#?
Answer by Jamora · Jul 23, 2013 at 12:33 AM
[HideInInspector]
As a rule, if UnityScript has @, C# has [].
if i have 2 variables
[HideInInspector]
public float m_CurrentValue;
[HideInInspector]
public float progressTextureWidth;
Like this ? suppose if i have 20 variables , then ?
You can also what i do alot is use internal ins$$anonymous$$d of public. internal is public but it won't show in the inspector. It does have some $$anonymous$$or diffrences but i never had a problem with it
You could also encapsulate your data like real programmers do (using private/protected access modifier), then use [SerializeField] to only show the ones you absolutely need to see in the inspector.
Your answer
Follow this Question
Related Questions
Astarpathfinding Scan all graphs 1 Answer
Javascript to C#: Vector 3 rigidbody 1 Answer
C# Array Question 2 Answers
Getting variables from c# to js 2 Answers
Unityscript to c# 1 Answer