2022-09-01から1ヶ月間の記事一覧
参考サイト様
概要 NPOI.HPSF.Array Auto Import に上記の文字列を追加する
概要 Debug.Log( element.layout.position );
ソースコード using UnityEngine; using UnityEngine.UIElements; namespace Kogane { public static class VisualElementExtensionMethods { public static Vector2 GetPosition( this VisualElement self ) { var element = self; var position = Vector2.…
概要 UnityEditor.Compilation.Assembly Auto Import に上記の文字列を追加する
概要 UnityEditor.VersionControl.Task Auto Import に上記の文字列を追加する
概要 Mono.CompilerServices.SymbolWriter.CodeBlockEntry* Auto Import に上記の文字列を追加する
概要 var assembly = typeof( SceneTemplateAsset ).Assembly; var type = assembly.GetType( "UnityEditor.SceneTemplate.SceneTemplateAssetInspectorWindow" ); var rebuildDependenciesMethodInfo = type.GetMethod( "RebuildDependencies", BindingFlag…
概要 DG.Tweening.Plugins.Core.PathCore* Auto Import に上記の文字列を追加する
概要 System.Diagnostics.CodeAnalysis.NotNullAttribute Auto Import に上記の文字列を追加する
ソースコード [SourceTemplate] public static void isnullorwhitespace( this string self ) { /*$ string.IsNullOrWhiteSpace( str ) */ }
ソースコード [SourceTemplate] public static void isnullorempty( this string self ) { /*$ string.IsNullOrEmpty( str ) */ }
概要 public static void DestroyGameObjectAll<T>( this T[] self ) where T : Component { if ( self is not { Length: > 0 } ) return; for ( var i = 0; i < self.Length; i++ ) { var component = self[ i ]; Object.Destroy( component.gameObject ); sel</t>…
概要 public static T[] Instantiates<T> ( T original, Transform parent, int count ) where T : Component { var array = new T[ count ]; original.gameObject.SetActive( true ); for ( var i = 0; i < count; i++ ) { var clone = Object.Instantiate( or</t>…
ソースコード using DG.Tweening; using DG.Tweening.Core; using DG.Tweening.Plugins.Options; using UnityEngine; namespace Kogane { public static class DOTweenRotateExtensionMethods { public static TweenerCore<Quaternion, Vector3, QuaternionOptions> DORotateX ( this Transform self,</quaternion,>…
ソースコード using System; using UnityEngine; namespace Kogane { public sealed class GameObjectSetActiveScope : IDisposable { private readonly GameObject m_gameObject; private readonly bool m_oldIsActive; public GameObjectSetActiveScope ( …
概要 using UnityEngine; namespace Kogane.Internal { /// <summary> /// シーン開始時に子オブジェクトをすべて削除するコンポーネント /// </summary> [DefaultExecutionOrder( -1000 )] [DisallowMultipleComponent] internal sealed class AutoDestroyChildrenComponent : …
ソースコード #if UNITY_EDITOR_OSX using System.Reflection; using UnityEditor; using UnityEditor.ShortcutManagement; using UnityEngine; namespace Kogane.Internal { /// <summary> /// Windows のようにショートカットキーを使用できるようにするエディタ拡</summary>…
概要 [MenuItem( "Tools/hoge" )] public static void Hoge() { var assetPath = "【アセットのパス】"; var fullPath = Path.GetFullPath( assetPath ); // Photoshop で開く例 Process.Start( @"open", $@"-a ""/Applications/Adobe Photoshop 2022/Adobe …
概要 [MenuItem( "Tools/hoge" )] public static void Hoge() { var assetPath = "【アセットのパス】"; var fullPath = Path.GetFullPath( assetPath ); Process.Start( @"open", fullPath ); }
概要 [MenuItem( "Tools/Hoge" )] public static void Hoge() { Process.Start( @"pkill", "Microsoft Power Point" ); }
概要 File.Move(sourceFileName, destFileName); FileUtil.MoveFileOrDirectory( source, dest ); 上記の関数でアセットのファイル名を変更したら AssetDatabase.ImportAsset のタイミングで Importer(TextScriptImporter) generated inconsistent result fo…
概要 Unity の Project ウィンドウで画像を選択したら Unity エディタが強制終了する現象に遭遇した Assertion failed on expression: 'it != m_SendMap.end()' ================================================================= Native Crash Reporting …
概要 /Applications/Unity/accelerator/unity-accelerator dashboard url
概要 ppt = Presentation() ppt.slide_width = Inches(16) ppt.slide_height = Inches(9) 上記のように設定する 参考サイト様
概要 AttributeError: module 'collections' has no attribute 'abc' python-pptx を使おうとしたら実行時に上記のエラーが発生する現象に遭遇した import collections.abc 上記の import 文を追加したらエラーが発生しなくなった 参考サイト様
概要 /Users/【ユーザー名】/.zshrc 上記のファイルを開いて(存在しない場合は作成してから開いて) alias python='python3' 上記のコードを入力して保存したら python コマンドが実行できるようになった 参考サイト様
リンク
概要 Define Constraints に入力するシンボルの先頭に ! をつけると そのシンボルが Scripting Define Symbols に定義されていない場合にのみ Assembly Definition が有効化されるようになります 参考サイト様
概要 EditorGUIUtility.labelWidth = 64;