3テラバイト

プログラム関連備忘録サイト。主にゲーム。

C# Unity

Unityで実行環境の情報を取得する方法

投稿日:2022年1月25日 更新日:

System.Environmentクラスで現在の環境についての情報が取得できます。

OSバージョン

System.OperatingSystem os = System.Environment.OSVersion;

ユーザー名

string userName = System.Environment.UserName;

環境変数

System.Collections.IDictionary environmentVariables = System.Environment.GetEnvironmentVariables();

使用可能なプロセッサの数

int processorCount = System.Environment.ProcessorCount;

-C#, Unity


comment

メールアドレスが公開されることはありません。 が付いている欄は必須項目です


reCaptcha の認証期間が終了しました。ページを再読み込みしてください。

関連記事

no image

UnityのManaged Memoryサイズをスクリプトから取得する

こんにちは、今日はUnityのManaged Memoryサイズをスクリプトから取得する方法についてまとめていきます。 Profiler.GetMonoUsedSizeLong() Profiler. …

no image

Unityでアプリケーションがフォーカスされていない場合に一時停止するかの設定

こんにちは、今日はUnityでアプリケーションがフォーカスされていない場合に一時停止するかの設定についてまとめていきます。 確認環境 Unity 2018.4.15f1 設定方法 Edit > Pro …

no image

Unityで古いプロジェクトを開いた際に表示されるAPI Update Requiredダイアログ

確認環境 Unity 2019.4.28f1 表示内容 This project contains scripts and/or assemblies that use obsolete APIs.I …

no image

Unityで数値を指定範囲に収める

確認環境 Unity 2018.4.15f1 数値を指定範囲に収める Clamp public static int Clamp(int value, int min, int max); publi …

no image

UnityのGUI.Labelのサイズを取得する

こんにちは、今日はUnityのGUI.Labelのサイズを取得する方法についてまとめていきます。 確認環境 Unity 2018.4.15f1 GUI.Labelのサイズを取得する string st …