New To The Forum? Click Here To Read The How To Guide. -- Developers Click Here.

OVROverlay.cs(385,20): error CS1501: No overload for method `CreateExternalTextur

panmasterpanmaster Posts: 198
Art3mis
I use Unity Unity 2017.1.0b8 (64-bit), I get error
Assets/OVR/Scripts/OVROverlay.cs(385,20): error CS1501: No overload for method `CreateExternalTexture' takes `6' arguments

I am very on the  wtf   side with solving  this,  any ideas?

Comments

  • imperativityimperativity Posts: 1,697 Oculus Staff
    Hi,

    In the interest of reproducing this on our end, can you elaborate on the steps you took that led you to this error?

    Also, have you consulted the documentation on OVROverlay's best practices here?





  • DebraNinjaMultimediaDebraNinjaMultimedia Posts: 5
    NerveGear
    I am encountering the same issue. As far as I can tell, my OVROverlay.cs script is not attached to any object. Did you end up figuring this out?
  • imperativityimperativity Posts: 1,697 Oculus Staff
    edited July 11
    @DebraNinjaMultimedia

    Could you list out the steps you took and software environment (unity version, oculus software, etc) you are in that resulted in this error? We have no other reports of this issue aside from the developer above. Any information would be great so we can reproduce this and/or push a fix if this turns out to be a bug.
  • DebraNinjaMultimediaDebraNinjaMultimedia Posts: 5
    NerveGear
    @imperativity
    I am using Unity Version2017.1.0f3 Personal, Oculus App Version 1.16.0.409144, on Windows 10.

    I originally tried it on an old Unity file, downloaded Oculus Utilities for Unity 5 1.16.0-beta. I imported this package into my file and got that error. I also made sure to change the build, player, and quality settings accordingly to these instructions.

    Thinking it had something to do with my old project, perhaps something was not properly replaced in the Utilities package import, I started a new project from scratch. I followed this tutorial until I got to Part 2: Add a control script to your Player. When I tried to add the script to the player, that's when I started getting " Assets/OVR/Scripts/OVROverlay.cs(385,20): error CS1501: No overload for method `CreateExternalTexture' takes `6' arguments " and it would not allow me to add the PlayerController script because I need to "Please fix compile errors before creating new script components".

    Please advise! Thank you!
  • imperativityimperativity Posts: 1,697 Oculus Staff
    @DebraNinjaMultimedia

    Thanks! I'm going to try and reproduce this now.
  • X-IngredientX-Ingredient Posts: 1
    NerveGear
    Same for me! Got notice after updating to the new 2017.1.0f3 version of Unity.

  • NZadenNZaden Posts: 33
    Brain Burst
    Same here.
  • iamtheonlyiamtheonly Posts: 2
    NerveGear
    It's because CreateExternalTexture method of Cubemap class probably got changed with Unity 2017. It now takes only 4 arguments and the SDK tries to pass 6 arguments, and there is no overload for 6.

    You just have to change the parameters. Cubemap method has only 1 size value because its texture is a rectangle, so you don't have to pass both width and height because they are equal.

    Also there is no parameter for color space - the "isSrgb" one.

    So if you fix those your method should look like

    et = Cubemap.CreateExternalTexture(size.w, txFormat, mipLevels > 1, externalTex);

    and you're good to go, but please wait for opinion from @imperativity . By no means I know how the SDK should work :P



  • DebraNinjaMultimediaDebraNinjaMultimedia Posts: 5
    NerveGear
    edited July 13
    @iamtheonly Your solution worked for now, it got rid of the error. Thanks!

    Will still wait to hear back from @imperativity before building anything final.

  • DebraNinjaMultimediaDebraNinjaMultimedia Posts: 5
    NerveGear
    edited July 13
    .
  • imperativityimperativity Posts: 1,697 Oculus Staff
    @DebraNinjaMultimedia

    I am having our integration team look into this issue as this has not been a problem until recently. I will update this thread when I have something additional to share.
  • JeffNikJeffNik Posts: 79
    Hiro Protagonist
    The above "fix" worked for me, too... looking forward to hearing a final solution.
  • PinelliPinelli Posts: 4
    NerveGear
    I was having the same issue and the change mentioned above from

    et = Cubemap.CreateExternalTexture(size.w, size.h, txFormat, mipLevels > 1, isSrgb, externalTex);

    To

    et = Cubemap.CreateExternalTexture(size.w, txFormat, mipLevels > 1, externalTex);

    solved the errors on rebuild for me.
  • psutterpsutter Posts: 1
    NerveGear
    I used the line of code and 4 new errors showed up. Maybe im missing something guess im reinstalling my ovr.
  • mixstahmixstah Posts: 1
    NerveGear
    This also worked for me too
  • andysonofbobandysonofbob Posts: 160
    Art3mis
    edited August 10
    Also having the same issues
    Updated the two lines of code in the editor, got the 4 new errors like the poster above.

    I can't see where the method is created in the file?

    How to reproduce?
    Start new project.
    Import Custom Package --> OculusUtilities.unitypackage
    Once imported
    errors

  • DebraNinjaMultimediaDebraNinjaMultimedia Posts: 5
    NerveGear
    @andysonofbob
    Open up the OVROverlay.cs script, find line 385 and delete "isSrgb, " from that line. That should do it

  • andysonofbobandysonofbob Posts: 160
    Art3mis
    Soz  That didnt work.

    Assets/OVR/Scripts/OVROverlay.cs(385,20): error CS1501: No overload for method `CreateExternalTexture' takes `5' arguments
    I also tried removing the argument from the else too.  It then gave two errors

    I am also getting this error.  I seem to log in fine though...

    Error loading launcher://unity/C:/Users/[SNIP]/AppData/Roaming/Unity/Packages/node_modules/unity-editor-home/dist/index.html?code=giCk8xeUP56X1XIctEW82Q00af&locale=en&session_state=b5c3f7321a9bde0d303f1d666289ef558480a2491dc7fca89e553ee7564e1db8.yaP4gRFOlLqiiAdtz9MEng01bf#/login


  • MalisceMalisce Posts: 1
    NerveGear
    I am stuck on this issue as well. proposed changes just created more issues :)
  • neilsarkarneilsarkar Posts: 4
    NerveGear
    Pinelli said:
    I was having the same issue and the change mentioned above from

    et = Cubemap.CreateExternalTexture(size.w, size.h, txFormat, mipLevels > 1, isSrgb, externalTex);

    To

    et = Cubemap.CreateExternalTexture(size.w, txFormat, mipLevels > 1, externalTex);

    solved the errors on rebuild for me.
    yep, this solved the issue for me as well. 

    also, I opted to download oculus utilities 1.15.0 instead of the latest (1.16-beta as of this writing), so this issue might already be fixed in the latest without manual intervention.
  • ogwestcoastogwestcoast Posts: 2
    NerveGear
    iamtheonly Thanks For solution. Worked for me,
  • Richy_TRichy_T Posts: 3
    NerveGear
    edited September 12
    Same issue here. All my stuff was quite out of date so now I am on the latest Oculus, Unity and Utilities. I'll try the fix but the notes say we probably shouldn't be editing these scripts so it would be nice to have it fixed properly.

    Edit: Fix worked good. Looks like some kind of regression maybe?
  • CoderDojoBelgiumCoderDojoBelgium Posts: 1
    NerveGear
    using Unity 2017.1.1f1, latest SDK, same error.
    Fixed worked OK for me as well.

Sign In or Register to comment.