Topic locked

No camera in Play Mode when re-opening scene/project

June 27, 2014 - 6:06am #1

I don't see any camera/webcam in PlayMode when I re-open my project. 

When I make a new clean project, import Vuforia and make an example everything works fine. But Vuforia isn't working after saving and re-opening my scene after closing Unity. This is very frustrating.

Error message:

Can't add component because class 'PremiumObjectFactoryStarterBehaviour' doesn't exist!
UnityEngine.GameObject:AddComponent(String)
QCARAbstractBehaviour:Awake()

Unity Pro v4.3.2.f1
Vuforia Unity Android/iOS v 3.0.6
Windows 7 64-bit

 

No camera in Play Mode when re-opening scene/project

July 4, 2014 - 4:29am #11

To summarize on the 2 issues in this thread (in case other developers facing similar issues read this thread):

  • The message "Unity Play Mode requires a Pro License" can in fact result from other forms of build corruption issues that do not necessarily relate to an actual License problem (as in the "DLL case" reported below by frank040, for example)
  • If you are sharing projects between multiple machines (be from Win to Mac or between two of the same kind), you should follow one of the following two procedures (both are correct):
    1. Packaging and exporting the project as a unitypackage and then importing it at the other machine, OR
    2. Sharing the Assets and ProjectSetting folders of a project between the computers (e.g. via a repository or by just copying them). In particular, the Library folder must not be shared.
      • Sharing the Library folder (especially across different platforms such as Windows and Mac) might lead to some project / build corruption state which may result in a variety of error states 
      • Note that the second approach (Sharing Assets and ProjectSettings) is basically equivalent to the first (i.e. using unitypackages), as the only difference is in that the unitypackages adds a packaging (zipping) step. 
  • Also note that, the above guidelines for correctly sharing projects are not Vuforia-specific, as they generally belong to the correct practices for sharing of Unity projects in general. Therefore, the resulting possible error messages that may derive from not respecting those guidelines are generally not a consequence of a specific Vuforia issue.
  • For more detailed and up-to-date information about Unity project sharing, please consult the official Unity website: http://unity3d.com/

 

No camera in Play Mode when re-opening scene/project

July 3, 2014 - 1:36am #10

Thanks frank040 for your update; glad that you solved the issue.

Waiting to see if francesco's problem (which sounds similar but possibly a little bit different from yours) is also resolved based on the tips in my previous message.

 

No camera in Play Mode when re-opening scene/project

July 3, 2014 - 1:27am #9

Already found a solution myself!

 

The problem is that we combine two Unity plugins: Vuforia & MobileMovieTexture. 

The solution is to copy  the plugin's Dll-files of both tools in both the 32- and 64-bit folders in the 'Plugins' folder. (the standard folder and the x86-folder).

 

Frank 

No camera in Play Mode when re-opening scene/project

July 3, 2014 - 1:22am #8

Hi Francesco,

as dm3d mentioned, we have tried to reproduce by sharing a Vuforia project between PC and Mac, but were unable to reproduce it.

Also, You mention:

Simply exchange a project between a mac and a pc.

Have you tried to do the same using a basic Vuforia project with an ARCamera and one Image Target for example ? As, this would help, i.e. it but would be good to be have a clearly reproducible case that you can share, if possible.

Also, I assume you are aware of the following Unity guidelines (which do not apply specifically to Vuforia, but are generally applicable to any Unity project):

  • There are two ways to share projects between multiple machines (be from Win to Mac or between two of the same kind):
    1. Packaging the project as a unitypackage and importing it at the other machine
    2. Sharing the Assets and ProjectSetting folders of a project between the computers (e.g. via a repository or by just copying them). In particular, the Library folder must not be shared.

Note that the second approach is basically equivalent to the first (i.e. using unitypackages), as the only difference is basically in that the unitypackages adds a packaging (zipping) step on top.

We know that certain issues may occur (mostly editor crashes or infinite import loops) if the Library folder is shared (and so it should not be shared, as stated above).

This can even happen sometime just when switching between two repository branches (in a version control system) of a project without deleting the local Library folder. This is however a Unity-specific issue, not specifically related to Vuforia. Unity explicitly instructs developers to exclude the Library folder from versioning.

 

So, since, as you say in your last message, using the unitypacke export + import technique solves the issue for you too, you can try to see if perhaps the error message you used to get when using the original approach was due to the sharing of the Library folder.

 

 

 

No camera in Play Mode when re-opening scene/project

July 2, 2014 - 6:36pm #7

Simply exchange a project between a mac and a pc.

However, i found out a solution,

Simply export a unity packages from the corrupted project with the scenes to a brand new project, and then import vuforia from it's original unity package.

This will solve

It is a real pain but it's the only thing that works.

No camera in Play Mode when re-opening scene/project

July 2, 2014 - 6:01pm #6

We haven't been able to reproduce the issue on either Mac or PC. We've also tried moving and saving projects between the two platforms. Could you share more about the project workflow process you are using? Are you using any form of version control with your Unity projects? If you can create a simple project that demonstrates this issue and attach it to your post, that might help us to troubleshoot.

No camera in Play Mode when re-opening scene/project

July 2, 2014 - 3:16pm #5

And just to make sure yes

i have unity 4.5.1 and vuforia 3.0.6

so this ugly bug is still there.

No camera in Play Mode when re-opening scene/project

July 2, 2014 - 3:15pm #4

"Concerning the Unity Pro license, note that despite the message "Unity Play Mode requires a Pro License", you can also use the Free version of Unity with Vuforia; in fact, since Unity version 4.3 and above, Vuforia no longer requires a Pro license (which was instead required on older versions, such as Vuforia 2.6 and older, in order to run Play Mode with webcam)."

 

LOL, i don't want to troll, but do you want understand that THIS IS NOT WORKING?

 

 

 

No camera in Play Mode when re-opening scene/project

July 1, 2014 - 12:09am #3

In addition to what dm3d suggests (always a good idea to upgrade to latest Unity version),

you can safely ignore the message:

Can't add component because class 'PremiumObjectFactoryStarterBehaviour' doesn't exist!

Concerning the Unity Pro license, note that despite the message "Unity Play Mode requires a Pro License", you can also use the Free version of Unity with Vuforia; in fact, since Unity version 4.3 and above, Vuforia no longer requires a Pro license (which was instead required on older versions, such as Vuforia 2.6 and older, in order to run Play Mode with webcam).

 

No camera in Play Mode when re-opening scene/project

June 30, 2014 - 9:08pm #2

You are using an old version of Unity with a new version of the Vuforia Unity plugin. I would suggest updating to Unity 4.5.1f3.

Topic locked