This is the only code I’m using and I’ve attached it to the main camera. Simple.
I can run it in the editor and it plays fine. Cam light comes on. No Problem.
I can build a web player version. Same. No Problem.
I can build a PC version. Same. No Problem.
But when I try and build a MAC version (universal or otherwise) I get this build error:
Assets/NewBehaviourScript.js(4,29): BCE0018: The name ‘WebCamTexture’ does not denote a valid type (‘not found’).
Did so.
Still the same error on a mac build. Remember, it runs and builds on every other platform (PC, web etc). And runs in Unity no problem.
It also builds perfectly in Unity 3.5.
Very odd, like the type is just not recognized by the mac compiler:
Assets/CAM.js(4,29): BCE0018: The name ‘WebCamTexture’ does not denote a valid type (‘not found’).
var webcamTexture : WebCamTexture;
function Start () {
webcamTexture = new WebCamTexture();
webcamTexture.Play();
Debug.Log(webcamTexture.isPlaying);
}
If it continues I would say just send a error report to unity because I just install maverick on my macbook pro and I am using the webcamtexture and it builds without any problems.
That does seem a little bit overkill.
For example, I make camera projects directly for advertisers, hospitals, kiosks etc. So I build straight to OSX. Killing the whole mac build side just because of the app store is silly.
It’s a temporary measure until they can implement a fix properly, and it’s not silly because many people (who don’t use WebCamTexture) need to build to the Mac app store (not the iOS app store) and needed a solution now, not later. You can just download a previous version and not use 4.3.2 if you aren’t going to submit to the Mac app store.
Understood.
I also noticed that apple changed the internal architecture of the cameras. They no longer have them on the high-speed bus on newer machines. Most of the hi-spec machines since July 2013 are like this. Including the machine I just bought. (This is confirmed on Macbook airs and pros).
As Unity pro user since 2007, it is the first time where i am little annoyed with Unity :
“4.3.2 : Disable WebCam support in MacStandalone as it was using newly-deprecated APIs, which made publishing to the Mac App Store impossible. Web Cam support in mac standalone will come back in a future release.”
Well well 4.3.3, 4.3.4 -----> 4.5.1 This does not still seem corrected.
Any news about this “future release”? Is WebcamTexture will be available soon on OSX without this boring message : << Video Capture is not available on this device. Make sure you are running iOS 4.0 or newer >>
yes, i saw that but… this don’t work for me (OS X 10.6.8). I suppose that AVFoundation framework have change since 10.7…
finally, confirmation after some tests : Use of AVFoundation framework for WebcamTexture works very well on OSX 10.9.4 WebcamTexture available on OS X > 10.7 only.