public void OnEnable() { scriptTarget = (RotationDragModifier) target; rotateX = scriptTarget.dXPerDBaseX != 0 || scriptTarget.dXPerDBaseY != 0 || scriptTarget.dXPerDBaseZ != 0; rotateY = scriptTarget.dYPerDBaseX != 0 || scriptTarget.dYPerDBaseY != 0 || scriptTarget.dYPerDBaseZ != 0; rotateZ = scriptTarget.dZPerDBaseX != 0 || scriptTarget.dZPerDBaseY != 0 || scriptTarget.dZPerDBaseZ != 0; x = new Vector3(scriptTarget.dXPerDBaseX, scriptTarget.dXPerDBaseY, scriptTarget.dXPerDBaseZ); y = new Vector3(scriptTarget.dYPerDBaseX, scriptTarget.dYPerDBaseY, scriptTarget.dYPerDBaseZ); z = new Vector3(scriptTarget.dZPerDBaseX, scriptTarget.dZPerDBaseY, scriptTarget.dZPerDBaseZ); }
public void OnEnable() { scriptTarget = (RotationDragModifier)target; rotateX = scriptTarget.dXPerDBaseX != 0 || scriptTarget.dXPerDBaseY != 0 || scriptTarget.dXPerDBaseZ != 0; rotateY = scriptTarget.dYPerDBaseX != 0 || scriptTarget.dYPerDBaseY != 0 || scriptTarget.dYPerDBaseZ != 0; rotateZ = scriptTarget.dZPerDBaseX != 0 || scriptTarget.dZPerDBaseY != 0 || scriptTarget.dZPerDBaseZ != 0; x = new Vector3(scriptTarget.dXPerDBaseX, scriptTarget.dXPerDBaseY, scriptTarget.dXPerDBaseZ); y = new Vector3(scriptTarget.dYPerDBaseX, scriptTarget.dYPerDBaseY, scriptTarget.dYPerDBaseZ); z = new Vector3(scriptTarget.dZPerDBaseX, scriptTarget.dZPerDBaseY, scriptTarget.dZPerDBaseZ); }