2022-05-20から1日間の記事一覧
概要 using UnityEngine; public class Example : MonoBehaviour { private void Awake() { var array = new[] { 0, 1, 2, 3, 4 }; // 1,2,3,4 foreach ( var value in array[ 1.. ] ) { Debug.Log( value ); } // 0,1,2,3 foreach ( var value in array[ ..…
概要 Preset を右クリックして「Exclude all properties」を押すと プロパティが除外設定に登録されるが順番に規則性がないため 除外設定を解除したいプロパティを探すのが大変だった using System.Linq; using UnityEditor; using UnityEditor.Presets; pub…
概要 MenuItem( "CONTEXT/XXXX" ) を指定した関数が エディタで Inspector を右クリックしても表示されない現象に遭遇した using UnityEditor; using MenuCommand = System.ComponentModel.Design.MenuCommand; // ★ public static class PresetMenuItem { […
ソースコード 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") palette = image.getpalet…
概要 Assembly for Assembly Definition File 'XXXX.asmdef' will not be compiled, because it has no scripts associated with it. UnityEditor.Scripting.ScriptCompilation.EditorCompilationInterface:TickCompilationPipeline (UnityEditor.Scripting.…
概要 using UnityEditor; public static class Example { [MenuItem( "Tools/Undo" )] private static void RunUndo() { Undo.PerformUndo(); } [MenuItem( "Tools/Redo" )] private static void RunRedo() { Undo.PerformRedo(); } } Undo.PerformUndo() や…
ソースコード 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. シーンを開いた時に上記のエラーが発生する現象に遭遇した 削除済みのプレハブから生成されたインスタンスが残っていたことが原因だった このイン…