Consider two scripts attached to the same GameObject, how Unity deals with conflict in code level?

For example if both scripts implement the update()function which one is called? Let's say that the same object has an Animation component and you enable it in one script but disable in the other, what happens? is there a default sequence of execution? Or do they share the same namespace, preventing the implementation of two functions with identical signature in different scripts?

Thanks

No, there is no way to know which Update() will come first. Don't code in such a way that it would matter. (If you have a specific head-scratching case, go ahead and post it for advice on improvement.)

I believe it was Joachim Ante who stated that UT was considering allowing ordering of functions in a future release, but it may never happen.

If LateUpdate isn't enough (because you have multiple of those too), you might have to play games with variables to test if they've been set yet and wait until a future call to Update to execute stuff.

eg:

ScriptA
  Start()
     B = GetComponent ("ScriptB")

  Update()
     if (B.ready)
       dosomething()

ScriptB
  Update
      doesSomething()
      ready = true;

Two identical scripts attached to the same object just means two instances of the script running on that object. There's no conflict, otherwise it wouldn't be possible to do. (e.g., try adding two box colliders to the same object.)

If you want to make sure one comes last, put it in `LateUpdate()`