コード例 #1
0
        private void Update()
        {
            ObiProfiler.EnableProfiler();
            Interpolate(Time.fixedDeltaTime, accumulatedTime);
            ObiProfiler.DisableProfiler();

            accumulatedTime += Time.deltaTime;
        }
コード例 #2
0
 private void Awake()
 {
     if (_instance != null && _instance != this)
     {
         DestroyImmediate(this);
     }
     else
     {
         _instance = this;
     }
 }
コード例 #3
0
 private void Awake()
 {
     if (_instance != null && _instance != this)
     {
         DestroyImmediate(this);
     }
     else
     {
         _instance = this;
         Oni.EnableProfiler(true);
     }
 }
コード例 #4
0
 private void Awake()
 {
     if (_instance != null && _instance != this)
     {
         DestroyImmediate(this);
     }
     else
     {
         _instance = this;
         Oni.EnableProfiler(true);
         numThreads = Oni.GetMaxSystemConcurrency();
     }
 }
コード例 #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;
        }
コード例 #6
0
 public void OnDestroy()
 {
     _instance = null;
     Oni.EnableProfiler(false);
 }