Example #1
0
        /*! \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);
        }
Example #2
0
        /*! \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);
        }