コガネブログ

平日更新を目標に Unity や C#、Visual Studio、ReSharper などのゲーム開発アレコレを書いていきます

2020-08-26から1日間の記事一覧

【Unity】The editor layout could not be fully loaded, this can happen when the layout contains EditorWindows not available in this project

概要 The editor layout could not be fully loaded, this can happen when the layout contains EditorWindows not available in this project 自作の EditorWindow を表示した状態で Unity を再起動したところ 上記のログが Console に出力されており、 自…

【Unity】GUI.Window の領域でクリックされた時に後ろ側でクリックイベントが反応しないようにする方法

ソースコード var current = Event.current; var type = current.type; var isMouseDragOrDown = type == EventType.MouseDrag || type == EventType.MouseDown; var isLeftButton = current.button == 0; if ( isMouseDragOrDown && isLeftButton ) { curre…

【Unity】New Scene ダイアログを無効化する方法

概要 新しいシーンを作成する時に表示される New Scene ダイアログを無効化したい場合は Unity メニューの「Edit > Project Settings...」を選択して 表示された「Project Settings」ウィンドウで「Scene Template」を選択して 「New Scene Menu」を「Builtin…

【Unity】Unity 2019.4 以前でスクリプトから Preset を適用する時にパラメータの除外を指定できる関数

ソースコード using System.Linq; using UnityEditor.Presets; using UnityEngine; public static class PresetUtils { public static void ApplyToWithExclusion ( Preset preset, Object target, params string[] excludedPropertyPaths ) { var selectedP…

【Unity】Unity 2020.1 新機能 - スクリプトから Preset を適用する時にパラメータの除外を指定できるようになった

ソースコード using UnityEditor.Presets; using UnityEngine; public static class PresetUtils { public static bool ApplyToWithExclusion ( Preset preset, Object target, params string[] excludedProperties ) { var current = preset.excludedProper…