「毎日Unity」の技術ブログ

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

2020-05-11から1日間の記事一覧

【UnityC#】float型からint型に変換する方法

float型からint型に変換することができるらしいのでメモ。 [ 変換方法 ] 下記はfloat型のFloatTestをint型に変換しIntTestに代入しています。 using System; using System.Collections.Generic; using UnityEngine; public class ScriptTest : MonoBehaviour…

【UnityC#】int型からfloat型に変換する方法

int型からfloatに変換することができるらしいのでメモ。 [ 変換方法 ] 下記はint型のIntTestをfloat型に変換しFloatTestに代入しています。 using System; using System.Collections.Generic; using UnityEngine; public class ScriptTest : MonoBehaviour {…