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:

  1. 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
  2. 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: my setup canvas when played: canvas plane (looking down) when played (it shouldn't this): plane should like: plane 2

i have found no reason why plane should have webcam texture. nothing in script or in unity.


Comments

Popular posts from this blog

scala - 'wrong top statement declaration' when using slick in IntelliJ -

c# - DevExpress.Wpf.Grid.InfiniteGridSizeException was unhandled -

PySide and Qt Properties: Connecting signals from Python to QML -