So im having an issue editing a variable via another script. Im trying to edit the contrast public float, how would i do this.
ive tried “using UnityStandardAssets.CinematicEffects;
mainMenuCamera.GetComponent ().BasicsSettings.contrast” but that doesnt work.
I dont know what im doing wrong. can anyone help me? i pretty new to programming and any help would be awesome. Sorry again for my newbieness. here is the first section of the contrast script. Not sure if more of the script is needed, if so just ask for it and ill post it
namespace UnityStandardAssets.CinematicEffects
[Serializable]
public struct BasicsSettings
{
[Range(-2f, 2f), Tooltip("Sets the white balance to a custom color temperature.")]
public float temperatureShift;
[Range(-2f, 2f), Tooltip("Sets the white balance to compensate for a green or magenta tint.")]
public float tint;
[Space, Range(-0.5f, 0.5f), Tooltip("Shift the hue of all colors.")]
public float hue;
[Range(0f, 2f), Tooltip("Pushes the intensity of all colors.")]
public float saturation;
[Range(-1f, 1f), Tooltip("Adjusts the saturation so that clipping is minimized as colors approach full saturation.")]
public float vibrance;
[Range(0f, 10f), Tooltip("Brightens or darkens all colors.")]
public float value;
[Space, Range(0f, 2f), Tooltip("Expands or shrinks the overall range of tonal values.")]
public float contrast;
[Range(0.01f, 5f), Tooltip("Contrast gain curve. Controls the steepness of the curve.")]
public float gain;
[Range(0.01f, 5f), Tooltip("Applies a pow function to the source.")]
public float gamma;
public static BasicsSettings defaultSettings
{
get
{
return new BasicsSettings
{
temperatureShift = 0f,
tint = 0f,
contrast = 1f,
hue = 0f,
saturation = 1f,
value = 1f,
vibrance = 0f,
gain = 1f,
gamma = 1f
};
}
}
}