简体   繁体   中英

The type or namespace name "..." could not be found - Unity Vuforia

I am pretty new to Unity and Vuforia. I am trying to do solve this following problem. I have a script file that I am using for 2 different Image targets. Only 1 script should be running at a time. So i opened "DefaultObserverEventHandler.cs" to handle tracking events. I want to disable the script on that particular Image target when the tracking is lost. But when i try to get a reference on the script "QuizzBehaviour" i get an error. "QuizzBehaviour" is located in my Assets folder. Thanks in advance. 在此处输入图像描述 在此处输入图像描述 在此处输入图像描述

Ok, I fixed it. I made my own "DefaultObserverEventHandler.cs" script and placed it in the same folder where my "QuizzBehaviour.cs" script is.

"Find" will search through objects in scene not in your folders.However, at all costs you should avoid searching for objects by typing their name manually.In your case, the matter is quite simple. You can either add a script to an object and then use the get component command, or you can make an abstract class and refer to it.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM