Search Unity

Help with an error Cardboard SDK "warning CS0618"

Discussion in 'AR/VR (XR) Discussion' started by Hashton, Jan 25, 2016.

  1. Hashton

    Hashton

    Joined:
    Nov 10, 2015
    Posts:
    25
    Hello all
    I am getting this error far too often. I have the latest Cardboard SDK and latest Unity update. Anyone have a fix?
    Assets/Cardboard/Scripts/VRDevices/BaseCardboardDevice.cs(122,8): warning CS0618: `UnityEngine.GL.IssuePluginEvent(int)' is obsolete: `IssuePluginEvent(eventID) is deprecated. Use IssuePluginEvent(callback, eventID) instead.'
    Thanks, Henry
     
    mathiagr likes this.
  2. computerartclub

    computerartclub

    Joined:
    Feb 8, 2016
    Posts:
    1
    I'm having the same issue. I might try to reinstall and older version, though I am still very new to unity.
     
    mathiagr likes this.
  3. mathiagr

    mathiagr

    Joined:
    Feb 16, 2016
    Posts:
    19
    Exactly the same issue here.
     
  4. tteneder

    tteneder

    Unity Technologies

    Joined:
    Feb 22, 2011
    Posts:
    175
    It's just a warning and safe to ignore for now.

    Note: Unity announced integrated Cardboard support recently. So just wait until Google fixes the warning in an update (I haven't tried 0.6 yet, but they may removed it there already.) or until you won't need the SDK anymore (no ETA atm).
     
    Hashton likes this.
  5. thehandsomedan

    thehandsomedan

    Joined:
    Jun 24, 2016
    Posts:
    3
    Anyone figure this one out yet? I tracked down the offending line of code, and it looks like it's just a matter of adding the 'callback' variable there.... But I have no idea what it should be calling back TO, so I can't remedy the issue. :(
     
  6. poanzefoijzoeijoirojio9029312

    poanzefoijzoeijoirojio9029312

    Joined:
    May 7, 2015
    Posts:
    1
    Hi,
    Seems to work with my code:
    GL.IssuePluginEvent(System.IntPtr.Zero, kRenderEvent);
     
    samuelcherry likes this.
  7. fuzzyeuclid

    fuzzyeuclid

    Joined:
    Dec 10, 2013
    Posts:
    1
    Well, it's now December 2016, days away from 2017, and this warning is still there. I suppose that means, "fo'getta'bout'it"? Using the latest custom build for Daydream with Google's VR SDK. Same results with the latest official Unity release. After so much time, I wonder why no one working on the VR SDK doesn't have a comment line about it. But that's me commenting and ranting, which maybe I wouldn't do except being a noob these things are very frustrating when trying to dip your toes into unfamiliar waters.
     
  8. samuelcherry

    samuelcherry

    Joined:
    Feb 1, 2017
    Posts:
    1
    Yep that worked for me thanks
     
  9. ruudvangaal

    ruudvangaal

    Joined:
    May 15, 2017
    Posts:
    27
    Passing System.IntPtr.Zero gives 'ArgumentException: Null callback specified' for me (in Unity 5.4.5.f1). And a lot of them, so it's not really better.