upstream changes - compatible Unity 4.6

upstream changes - compatible Unity 4.6