// Use this for initialization void Start() { //Using object pool for some objects to do optimization _scriptLeftStraightPool = poolManagerForLeftSideStraight.GetComponent <ObjectPoolingDemo>(); _scriptLeftDifferentPool = poolManagerForLeftSideDifferent.GetComponent <ObjectPoolingDemo>(); _scriptRightStraightPool = poolManagerForRightSideStraight.GetComponent <ObjectPoolingDemo>(); _scriptRightDifferentPool = poolManagerForRightSideDifferent.GetComponent <ObjectPoolingDemo>(); }
void Awake() { instance = this; }