Example #1
0
        private void Update()
        {
            ObiProfiler.EnableProfiler();
            Interpolate(Time.fixedDeltaTime, accumulatedTime);
            ObiProfiler.DisableProfiler();

            accumulatedTime += Time.deltaTime;
        }
Example #2
0
 private void Awake()
 {
     if (_instance != null && _instance != this)
     {
         DestroyImmediate(this);
     }
     else
     {
         _instance = this;
     }
 }
 private void Awake()
 {
     if (_instance != null && _instance != this)
     {
         DestroyImmediate(this);
     }
     else
     {
         _instance = this;
         Oni.EnableProfiler(true);
     }
 }
Example #4
0
 private void Awake()
 {
     if (_instance != null && _instance != this)
     {
         DestroyImmediate(this);
     }
     else
     {
         _instance = this;
         Oni.EnableProfiler(true);
         numThreads = Oni.GetMaxSystemConcurrency();
     }
 }
Example #5
0
        private void FixedUpdate()
        {
            ObiProfiler.EnableProfiler();

            BeginStep(Time.fixedDeltaTime);

            float substepDelta = Time.fixedDeltaTime / (float)substeps;

            // Divide the step into multiple smaller substeps:
            for (int i = 0; i < substeps; ++i)
            {
                Substep(Time.fixedDeltaTime, substepDelta, substeps - i);
            }

            EndStep(substepDelta);

            ObiProfiler.DisableProfiler();

            accumulatedTime -= Time.fixedDeltaTime;
        }
 public void OnDestroy()
 {
     _instance = null;
     Oni.EnableProfiler(false);
 }