Created
February 25, 2016 03:35
-
-
Save cabbibo/0c988d4e6eb93a66e92a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
foreach (var field in typeof(ComputeUniforms).GetFields()){ | |
if(Sliders[field.Name] != null ){ | |
FloatUniform u = (FloatUniform)field.GetValue( computeUniforms ); | |
GameObject slider = (GameObject)Sliders[field.Name]; | |
float v = slider.GetComponent<Slider>().Value; | |
float final = v * (u.high - u.low) + u.low; | |
u.value = final; | |
//var f = typeof(FloatUniform).value; | |
//f.SetValue( u , final ); | |
field.SetValue( computeUniforms , u ); | |
}else{ | |
print( "NO SLIDERSSS"); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment