2022-05-01から1ヶ月間の記事一覧
ソースコード import glob from PIL import Image directory_path = "【フォルダのパス】/**/*.png" files = glob.glob(directory_path, recursive=True) for path in files: image = Image.open(path) image = image.convert("P") image.save(path)
ソースコード from PIL import Image path = "【.png のファイルパス】" image = Image.open(path) print(image.mode) image = image.convert("P") print(image.mode) image.save(path)
概要 Unable to parse XXXX.framework.js.br! If using custom web server, verify that web server is sending .br files with HTTP Response Header "Content-Encoding: br". Brotli compression may not be supported over HTTP connections. Migrate you…
概要 Please remove the CanvasRenderer component from the [XXXX] GameObject as this component is no longer necessary. Unity プロジェクトのバージョンを上げたら ゲーム再生中に上記の警告が出力される現象に遭遇した 警告ログに記載されているゲーム…
概要 Prefab instance problem: XXXX (Missing Prefab with guid: YYYY) UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&) シーンを開いた時に上記のエラーが発生する現象に遭遇した 削除済みのプレハブから生成されたインスタンスが残っていたこと…
概要 Problem detected while opening the Scene file: 'XXXX'. Check the following logs for more details. シーンを開いた時に上記のエラーが発生する現象に遭遇した 削除済みのプレハブから生成されたインスタンスが残っていたことが原因だった このイン…
概要 System.HashCode を使用すると GetHashCode を簡単に実装できる using System; using UnityEngine; public sealed class Character { public int Id { get; } public string Name { get; } public Character ( int id, string name ) { Id = id; Name =…
概要 デフォルトだと上のような表示になりますが TextMesh Pro 3.2.0-pre.3 以降であれば下のような表示にできます マテリアルの Shader を「TextMeshPro/Mobile/Distance Field - 2 Pass」にすることで アウトラインが重なったところを良い感じにくっつけて…
概要 using System.Linq; using UnityEngine; public class Example : MonoBehaviour { private void Awake() { var array = new[] { 1, 2, 3 }; Debug.Log( array[ array.Length - 1 ] ); // 昔ながらの方法 Debug.Log( array.Last() ); // LINQ を使用 Deb…
スライド
概要 IDisposable を実装するクラスや構造体の中で Alt + Insert を押して「Generate dispose pattern」を押して Dispose を呼びたいメンバを選択して「OK」を押すと Dispose を自動生成できます Dispose の枠組みだけを自動生成したい場合は IDisposable を…
概要 クラスや構造体の中で Alt + Insert を押して「Formatting members」を押して ToString に含めたいメンバを選択して「OK」を押すと ToString を自動生成できます
概要 クラスや構造体の中で Alt + Insert を押して「Equality members」を押して 比較に使用したいメンバを選択して「OK」を押すと Equals や GetHashCode を自動生成できます
はじめに 「mgGIF」を Unity プロジェクトに導入することで GIF 動画を再生できるようになります 使用例 クイックスタート Quad オブジェクトに Animated Textures コンポーネントをアタッチすると StreamingAssets フォルダ内の GIF 動画を再生できます htt…
紹介動画 #unity1week で2つのアクションパズルゲームを公開しました!(全90ステージ)https://t.co/gNKp0BuSG7https://t.co/YSfT0NfEh5ブロックを4つ揃えてゴールを目指す「ハコケシ」と、ブロックをスライドしてゴールを目指す「ハコズラシ」です#unityro…
概要 Uncaught RangeError: Maximum call stack size exceeded at XXXX unityroom にゲームをアップロードして動作確認しようとしたところ 上記のエラーが発生してゲームをプレイできない現象に遭遇した Chrome のキャッシュを削除したら正常にプレイできる…
概要 Uncaught (in promise) RuntimeError: memory access out of bounds unityroom にゲームをアップロードして動作確認しようとしたところ 上記のエラーが発生してゲームをプレイできない現象に遭遇した Chrome のキャッシュを削除したら正常にプレイでき…
概要 var www = UnityWebRequest.Post( "XXXX", formData ); 上記のようなコードを実行してから Unity の再生を停止すると A Native Collection has not been disposed, resulting in a memory leak. Enable Full StackTraces to get more details. このエラ…
概要 Package Manager で「JetBrains Rider Editor」をアップデートすると RiderScriptEditorPersistedState.asset の変更が発生しなくなるので あとは RiderScriptEditorPersistedState.asset を手動で削除します 参考サイト様 https://youtrack.jetbrains.…
概要 Building Library\Bee\artifacts\WebGL\build\debug_WebGL_wasm\build.js failed with output: emcc2: error: Invalid command line option -s BINARYEN_TRAP_MODE=clamp: The wasm backend does not support a trap mode (it always clamps, in effect…