Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Problem with using Google Cardboard data type(?) Code

Discussion in 'AR/VR (XR) Discussion' started by Reynaldi, Dec 1, 2016.

  1. Reynaldi

    Reynaldi

    Joined:
    Nov 5, 2016
    Posts:
    14
    Hi! sorry if the tittle is a bit confusing since i don't know what it's called actually.
    So i'm trying to make a VR application using google cardboard sdk from https://coderbyte.com/tutorial/create-a-virtual-reality-game-for-google-cardboard
    I already got the cardboard package imported but when i was trying to paste the code from the website, i got an error saying

    The type or namespace name 'CardboardHead' could not be found (are you missing a using directive or an assembly reference?) ProjectVR.CSharp D:\Skripsi\Application\ProjectVR\Assets\Script\StareScript.cs
    and
    The type or namespace name 'FPSInputController' could not be found (are you missing a using directive or an assembly reference?) ProjectVR.CSharp D:\Skripsi\Application\ProjectVR\Assets\Script\StareScript.cs

    i don't think i miss any step from the site's tutorial video. the only thing i did differently is that i already created my scene before i try to apply the code, and i didn't made it on the demo scene from the imported package. the first time i see that i think i was missing something, so i re-download and import the newly downloaded package. and i got a few things marked as "new" so i think that was the problem. but when i tried to import it, unity got an error but i forgot what it says but then it forces quit.

    i then reopen the project and check the import again, this time there's no "new" tag shown, then i tried deleting the previos C# code file, and creating a new one on the GVRMain (the camera), but the error still exist, what can i do to fix this?
     

    Attached Files:

  2. joejo

    joejo

    Unity Technologies

    Joined:
    May 26, 2016
    Posts:
    958
    You are missing a CS file for that type or you are missing the .Net library that exports that type. I have no experience with the specific library/scripts you are trying to use but that is the gist of the issue. Have you tried asking the person that posted the article and tools you are following?
     
    Reynaldi likes this.
  3. Selzier

    Selzier

    Joined:
    Sep 23, 2014
    Posts:
    652
    That tutorial is pretty old, start here:
     
    Reynaldi likes this.
  4. Reynaldi

    Reynaldi

    Joined:
    Nov 5, 2016
    Posts:
    14
    oh yeah i did miss a few step, i forgot to import 2 cs file. but i still got a few problems about it. so i tried looking for a new way to do this. but thnx this solves my quetsion ^^

    hi! thnx for the link ^^ i got some usefull information for my program from there after watching it. what a coincidence i was browsing through youtube for a new way to make my program works and i just watched your video, and the live one. i've posted a comment on your video if you could help me fix it. about the dot in the middle of the camera doesn't react with the 3d model i have (but it reacted with a simple cube) and about if it can be used to open a new scene after a few seconds (i already reached on youtube for the timed gaze tutorial, but haven't watched it yet). once again thnx for your help ^^
     
  5. Reynaldi

    Reynaldi

    Joined:
    Nov 5, 2016
    Posts:
    14
    oh sorry i didn't realize i haven't put a collider on my 3d model, it works now ^^
     
    Selzier likes this.