Answers for "unity how to show a private variable in inspector"

C#
3

unity how to show a private variable in inspector

//Will Show class in the inspector
[System.Serializable]
public class MyClass{
}  

public class otherClass{
} 

public MyClass thatClass; //will show 

public otherClass thatotherClass; //will NOT show

public int public_int; // will show beacuse it's an public variable 
private int private_int; // will NOT show beacuse it's an private variable 

[SerializeField] 
private private_int2; // will show beacuse it has an Serialize Field

protected int protValue; // will not show.
Posted by: Guest on September-22-2020

Code answers related to "unity how to show a private variable in inspector"

C# Answers by Framework

Browse Popular Code Answers by Language