/*! \cond UNITY */ protected override void Awake() { base.Awake(); name = "_CurvyGlobal_"; transform.SetAsLastSibling(); Object.DontDestroyOnLoad(this); mPoolManager = GetComponent <PoolManager>(); var s = new PoolSettings() { MinItems = 0, Threshold = 50, Prewarm = true, AutoCreate = true, AutoEnableDisable = true }; mControlPointPool = mPoolManager.CreateComponentPool <CurvySplineSegment>(s); }
/*! \cond UNITY */ public override void Awake() { base.Awake(); name = "_CurvyGlobal_"; transform.SetAsLastSibling(); // Unity 5.3 introduces bug that hides GameObject when calling this outside playmode! if (Application.isPlaying) { Object.DontDestroyOnLoad(this); } mPoolManager = GetComponent <PoolManager>(); var s = new PoolSettings() { MinItems = 0, Threshold = 50, Prewarm = true, AutoCreate = true, AutoEnableDisable = true }; mControlPointPool = mPoolManager.CreateComponentPool <CurvySplineSegment>(s); }