Hello
my environ :
win7
unity 3.5
c#
Android(galaxy s4)
pc (i5-750, ddr3 16g)
i making android game project with Unity3d.
but i can’t solving this problem, finally i reached next : Unity Ignores Script Execution Order
GameObject ‘Block’ is a Prefab, and managed customized pooling.
it have script scBlock.cs and scObjectPool.cs and many Others. (every script is monobehaviour script)
(and i know the pooling is very complicated of using start() or awake() because i using pooling)
problem :
I want scObjectPool.Awake is called before scBlock.cs
but I Logged it, It always scBlock.Awake() is first. (and next log is scObjectPool.Awake)
(and i think my log can’t be wrong. cuz my log position is first line of each component’s Awake() function’s)
i tried to using scBlock.OnEnable because script running order is Awake->OnEnable->Start…
but scBlock.OnEnable is called first of scObjectPool.Awake
the order is scBlock.Awake → scBlock.OnEnable → scObjectPool.Awake
so i tried to using Edit->Project Settings->Script Execution Order
And make scObjectPool’s order -3 (upper than Default Time… and scBlock’s order is Default Time)
but result is same. the order is scBlock.Awake → scBlock.OnEnable → scObjectPool.Awake
and i tried to make scObjectPool’s order -3, and scBlock’s order -2. …
…
but result is same! the order is scBlock.Awake → scBlock.OnEnable → scObjectPool.Awake!
this result say to me “the unity ignores script execution ordering!”
who knows why this problem happens?
it is just a bug? (unity 3.5.5f)
or script execution order is following Prefab inspector’s showing order?
And i finally bypass problem, but if i can’t know the problem’s origin, the problem bothering me after all. please someone help me!