here : Unity - Manual: Interaction with browser scripting
you guys missed to write one thing in your c# script that is “using System.Runtime.InteropServices;” due to this i lost my half-hour searching solution for this error “error CS0246: The type or namespace name `DllImport’ could not be found. Are you missing a using directive or an assembly reference?”
i am pointing this out because, some one in future should not face this problem.