private static PropertyModification[] MaterialPropertyToPropertyModifications(MaterialProperty materialProp, UnityEngine.Object target, Color color) { PropertyModification[] array = MaterialAnimationUtility.CreatePropertyModifications(4, target); MaterialAnimationUtility.SetupPropertyModification(materialProp.name + ".r", color.r, array[0]); MaterialAnimationUtility.SetupPropertyModification(materialProp.name + ".g", color.g, array[1]); MaterialAnimationUtility.SetupPropertyModification(materialProp.name + ".b", color.b, array[2]); MaterialAnimationUtility.SetupPropertyModification(materialProp.name + ".a", color.a, array[3]); return(array); }
private static PropertyModification[] MaterialPropertyToPropertyModifications(string name, UnityEngine.Object target, Vector4 vec) { PropertyModification[] array = MaterialAnimationUtility.CreatePropertyModifications(4, target); MaterialAnimationUtility.SetupPropertyModification(name + ".x", vec.x, array[0]); MaterialAnimationUtility.SetupPropertyModification(name + ".y", vec.y, array[1]); MaterialAnimationUtility.SetupPropertyModification(name + ".z", vec.z, array[2]); MaterialAnimationUtility.SetupPropertyModification(name + ".w", vec.w, array[3]); return(array); }
private static PropertyModification[] MaterialPropertyToPropertyModifications(MaterialProperty materialProp, UnityEngine.Object target, float value) { PropertyModification[] array = MaterialAnimationUtility.CreatePropertyModifications(1, target); MaterialAnimationUtility.SetupPropertyModification(materialProp.name, value, array[0]); return(array); }