Hiding attributes

Is there a way to hide a globally created attribute in the UI window? Such that other scripts can access this attribute but it is not visible in the front end?

var myScript = pc.createScript('myScripting');

myScript.attributes.add('moveDuration', {type: 'number', default: 3.0}); //hide this

Hi @saifs,

If you don’t need it to show in editor, then no need to declare it as an attribute. A script property can do just the same:

// inside a script method e.g. initialize
this.moveDuration = 1.0;

Now this property can be accessed by other scripts in the same manner you would access an attribute.