bool AxisInverted(string description[, bool inversionStatus])
bool AxisInverted(int descriptionHash[, bool inversionStatus])


description: The name/description of the axis you want to invert.
descriptionHash: The hashcode of the name/description of the axis you want to invert.
inversionStatus: If true, axis will be inverted. If false, axis will not be inverted.


bool: Whether or not the axis of description or descriptionHash is inverted.


If inversionStatus is not passed in, AxisInverted() will simply return the current inversion status of the axis. If inversionStatus is passed in, then the inversion status of this axis will be set to the value of inversionStatus.


// this toggles the inversion status of "Horizontal" cInput.AxisInverted("Horizontal", !cInput.AxisInverted("Horizontal")); // this makes a toggle button in the GUI cInput.AxisInverted("Horizontal", GUILayout.Toggle(cInput.AxisInverted("Horizontal"), "Invert Axis"));

results matching ""

    No results matching ""