MonoBehavior Ediotr vars

  1. when i declare variable like public, it can be reached from editor, and from other scripts.

How can i hide this variable for other scripts?

P.S If i Whant to hide public variable from editro I simply use get / set functions. But What to do if I whant make public variable from Editor only?

You can use the attribute [HideInInspector] - c# or @HideInInspector - js to hide it, don’t bother with the properties unless you need them.

You can’t make a variable public only to the editor as far as I know.