Skip to content

bluebackblue/UpmTimeScale

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

62 Commits
 
 
 
 
 
 
 
 

Repository files navigation

BlueBack.TimeScale

タイムスケール操作

  • 停止、再開、ステップ再生

ライセンス

MIT License

依存 / 使用ライセンス等

ランタイム

エディター

サンプル

動作確認

Unity 2022.1.0b16

UPM

最新

開発

Unityへの追加方法

  • Unity起動
  • メニュー選択:「Window->Package Manager」
  • ボタン選択:「左上の+ボタン」
  • リスト選択:「Add package from git URL...」
  • 上記UPMのURLを追加「 https://github.com/~~/UPM#バージョン

Gitクライアントがインストールされている必要がある。

/** ポーズ。ステップ再生。
*/
public sealed class Exsample : UnityEngine.MonoBehaviour
{
	/** timescale
	*/
	private BlueBack.TimeScale.TimeScale timescale;
	/** Start
	*/
	private void Start()
	{
		//timescale
		this.timescale = new BlueBack.TimeScale.TimeScale();
	}
	/** Update
	*/
	private void Update()
	{
		//ポーズ。
		if(UnityEngine.Input.GetKeyDown(UnityEngine.KeyCode.Space) == true){
			this.timescale.SetPause(true);
		}
		//ステップ再生。
		if(UnityEngine.Input.GetKeyDown(UnityEngine.KeyCode.Return) == true){
			this.timescale.StepPlay();
		}
	}
}