Author Topic: Is there anything wrong with executing my scripts before all of NGUI's scripts?  (Read 1468 times)


  • Newbie
  • *
  • Thank You
  • -Given: 4
  • -Receive: 0
  • Posts: 30
    • View Profile
Because of an issue of undeclared variable, I have to change the execution order of my scripts.

I put my problematic script right after "Default Time" in MonoManager (right before UIInput and UI2DSprite), but the problem is my draggable scrollview fails to spread its cells horizontally at Start() as it's supposed to: all the cells are on top of each other.

What did I do wrong? How did I mess up NGUI's scripts by just putting one of my scripts right after Default Time?

By trial and error I found that if I put my two problematic scripts at the top (above RealTime), the problem disappears. Would that cause a problem to NGUI if I execute these 2 scripts before NGUI scripts?

Thanks a lot


  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
It really depends on what it is you're actually doing inside your scripts, so without knowing that I can't answer your question.