「毎日Unity」の技術ブログ

開発で役立つ情報を発信する

【UnityC#】スクリプトからFixedTimestepを変更する方法

スクリプトからFixedTimestepを変更する方法を自分用にメモ。

[ 変更方法 ]

「Time.fixedDeltaTime = 〇;」で変更できます。

[ 使用例 ]

下記はFixedTimestepを0.01に変更するスクリプトです。

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using System;

public class ScriptTest : MonoBehaviour
{
    void Start()
    {
        Time.fixedDeltaTime = 0.01f;
    }
}