lvlup
1
i'm new!
to everything unity!
how do i, or what do i type, in my c# script, if i want to edit the value of one of the component variables?
example:
Component > Constant Force > Force > X Y Z - "i want to edit Z value/adjustable with script"
so that the Z value can be changed in the game..
Assign Vector3 to force, for example, 10 to z direction like:
constantForce.force = Vector3(0,0,10);
the keyword forward denotes the z direction, so you can use in the RHS
Vector3.forward * 10;
Is this what you're looking for:
public int myVariableThatCanBeEditedInTheInspector;
?
[Nm; I think I misunderstood the question.]