Gamerch
あかさ

枠組み

最終更新日時 :
1人が閲覧中
作成者: ユーザー98083
最終更新者: ユーザー98083

基本の枠組み

using System.Collections;

using System.Collections.Generic;

using UnityEngine;

using UnityEngine.UI;

using UnityEngine.SceneManagement;

using System;


public class タイトル : MonoBehaviour

{


void Start()

{

}


void Update()

{

}


void FixedUpdate()

{

}


}



説明

システム

ユニティで使うシステムを最初に入れる

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
初期設定
using UnityEngine.UI;テキスト表示に必要
using UnityEngine.SceneManagement;シーン移動に必要
using System;Actionを使ったプログラムに必要

プログラムのタイトル

public class タイトル : MonoBehaviour
{
}
void Start()
{
}
最初のフレームに実行するプログラムを書く
void Update()
{
}
毎フレームで実行されるプログラムを書く
void FixedUpdate()
{
}
2,3フレームごとに

物体は少しづつパラパラ絵で動いている。フレームは少しだけ進む1コマのこと。

Updateは80fps なら 0.0125 秒ごと。40fpsなら0.025 秒ごとに実行される。

FixedUpdate は0.02 秒ごと(=1 秒に 50 回)実行される。

FixedUpdate は物理移動の時に使うプログラム。Updateとタイミングが違うのでUpdateのプログラムとつなげる時に注意が必要。

コメント (枠組み)
  • 総コメント数0
この記事を作った人
やり込み度

Wikiにゲームが紐づいていません

編集者紹介

未登録

注目記事
ページトップへ