public void Slide1( ) { S1.GetComponentsInChildren <Text>( ).FirstOrDefault(i => i.name == "Value").text = ((int)S1.value).ToString(); Speed = S1.value / 100; }