Unaware only ignores visible stat boosts, like from Iron Defence or Swords Dance. So rock types would keep the SDef boost. #2nub4u
>If the wielder is the target of an attack, all of the attacker's Attack, Special Attack, and accuracy stat stages are ignored during damage calculation and accuracy checks. If the wielder is attacking, all of the defender's Defense, Special Defense, and evasion stat stages are ignored during damage calculation and accuracy checks.
Source