Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

"WebGL: Interacting with browser scripting" in this section there is a small thing missing.

Discussion in 'Documentation' started by sushanta1991, Oct 12, 2015.

  1. sushanta1991

    sushanta1991

    Joined:
    Apr 3, 2011
    Posts:
    305
    here : http://docs.unity3d.com/Manual/webgl-interactingwithbrowserscripting.html

    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.
     
    Mikael-H likes this.
  2. duck

    duck

    Unity Technologies

    Joined:
    Oct 21, 2008
    Posts:
    358
    Good catch, sorry it wasted your time. I'll fix the page a.s.a.p.

    By the way, if a function shows up as not supported you can right-click on it in Monodevelop or Visual Studio, and use the "Resolve Using..." menu to automatically add the correct "using" function required, like this:

    resolve using.gif