@editable_vector_slider doesn't work as documented

I cannot make the editable_vector_slider work with a vector3. The snippet doesn’t work.

This is the snippet

# An editable vector slider. You can drag to change the values of each of the vector components.
	    @editable_vector_slider(float):
	        # The tool tip for this editable.
	        ToolTip := VectorSliderTip
	 
	        # The categories this editable belongs to.
	        Categories := array{FloatsCategory}
	 
	        # Shows the option to preserve the ratio between vector values in the editor.
	        ShowPreserveRatio := true
	 
	        # Shows the option to normalize the vector in the editor.
	        ShowNormalize := true
	 
	        # The minimum value of each component. You cannot set an editable value for this number lower
	        # than the MinComponentValue.
	        MinComponentValue := option{0.0}
	 
	        # The maximum value of each component. You cannot set an editable value for this number higher
	        # than the MaxComponentValue.
	        MaxComponentValue := option{10.0}
	 
	        # The amount the slider value increases or decreases per delta.
	        SliderDelta := option{0.5}
	 
	        # The sensitivity of the mouse movement required to cause a delta increase.
	        MouseLinearDeltaSensitivity := 0.25
	 
	        # The amount of pixels required to move the mouse to cause a delta increase.
	        MouseShiftMovePixelPerDelta := 0.25
	 
	    FloatVectorSlider:vector3 = vector3{X := 1.0, Y := 2.0, Z := 3.0}

Btw, this button copies without line jumps
imagen

Hi! I’m not sure if I understood you correctly, but your problem…

Your problem is that you need to create it as a variable.

I mean, you have to put “var” after the word “@editable”.

If I wanted to create that variable, I’d do it like this:
@editable var FloatVectorSlider : vector3 = vector3{}

Hope I helped! If not, I’ll keep an eye on the post :slightly_smiling_face:

Ohh yeah. A that moment I thought it could be available as editable a constant too and it would be “pushed” into the verse code. I wanted to point out that the docs are actually misguiding, as they have no var.

1 Like