osx - Really Sporadic Unity Behavior? No Idea What is Causing it -
so have unity 5 mac, i'm on os x 10.11, , i'm using monodevelop. on past week or glitch, bug, whatever has been getting more , more annoying point now. have 1 script running , when play project 2 things happen:
- the script doesn't run! have outputting ton of things , doesn't output or supposed to. i've tried refreshing assets , everything, after first run, nothing
- there stranger thing happening. have rawimage used display webcam , plane far far away rawimage. making custom material plane has white , red. nonetheless, plane shows webcam. there no code or property connecting 2 whatsoever.
these 2 events happen together. have restart unity every run fix this. i'll run once, maybe twice, 3 times , work fine next time these things. after running few times switch back. i'll run 10 or 15 times , doesn't go , have restart unity. has run form of strange bug / glitch before?
[edit] here code might causing problem. code called in start method:
ienumerator takepicandgetbestcolor() { yield return new waitforseconds (0.5f); print ("here"); if (webcamtexture.width > 100) { print ("here"); initframe = webcamtexture.getpixels (); currentframe = initframe; print ("waiting again"); if (initframe [0].r >= 0.999f || initframe [0].g >= 0.999f || initframe [0].b >= 0.999f) { print ("waiting"); yield return new waitforseconds (0.5f); } sorterthread = new thread (() => trackphone.sortcolors(initframe)); print ("started"); sorterthread.start (); } }
it prints "here," doesn't print "here."
here screenshots: setup: canvas when played: plane (looking down) when played (it shouldn't this): should like:
i have found no reason why plane should have webcam texture. nothing in script or in unity.
Comments
Post a Comment