2022-09-09から1日間の記事一覧
概要 var fullPath = Path.GetFullPath( assetPath ).Replace( "\\", "/" ); var currentDirectory = Directory.GetCurrentDirectory(); var relativePath = Path.GetRelativePath( currentDirectory, fullPath ).Replace( "\\", "/" ); var isPackageCache …
概要 private static string ToLiteralString( object value ) { if ( value == null ) return "null"; if ( value is bool boolValue ) return boolValue ? "true" : "false"; if ( value is float floatValue ) return $"{floatValue}f"; if ( value is lo…
概要 private static bool IsAsynchronousMethod( MethodInfo methodInfo ) { return IsUniTask( methodInfo.ReturnType ); } private static bool IsUniTask( Type type ) { return type.IsGenericType ? type.GetGenericTypeDefinition() == typeof( UniTa…
概要 private static bool IsUniTask( Type type ) { return type.IsGenericType ? type.GetGenericTypeDefinition() == typeof( UniTask<> ) : type == typeof( UniTask ) ; }
ソースコード using UnityEditor; using UnityEditorInternal; using UnityEngine; namespace Kogane.Internal { internal static class TransformCopyComponentPasteComponentValues { [MenuItem( "CONTEXT/Transform/Copy Component" )] public static voi…