calculate things... and display in inspector

so, i have a script (js) like that:

var a;
var b;

var c;
c = a + b;

after i attach this script to an object, i wonder if there is any way in that if i change the values of a or b, to see the new "c" in inspector... some kind of input text for a and b and dynamic text for c.

As unity does not display properties with getters/setters, your best bet would be writing a custom inspector.

Try playing around with ExecuteInEditMode.

So like this:

@script ExecuteInEditMode()

var a;
var b;
var c;

void Update()
{
    c = a + b;
}

(I haven't tested this.)

yep, this is working! thanks!

i just added the var types for a,b,c, i get some errors if not... here is the javascript version:

@script ExecuteInEditMode()

var a:float;
var b:float;
var c:float;

function Update() {
    c = a + b;
}