Problem with using Google Cardboard data type(?) Code

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 Coderbyte | The #1 Coding Assessment Platform
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?


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?

1 Like

That tutorial is pretty old, start here:

1 Like

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 ^^

oh sorry i didn’t realize i haven’t put a collider on my 3d model, it works now ^^

1 Like