UPM Custom Template
[0.0.1] - 20xx-0x-0x
- feature
- sample
- change
- sample
- fix
- sample
import Foundation | |
import XcodeKit | |
// このGistでは実装のコア部分である`SourceEditorCommand.swift`のみアップ (実装は適当) | |
// Xcode Source Editor Extensionsの導入に関しては以下を参照 | |
// | |
// - Creating a Source Editor Extension | |
// https://developer.apple.com/documentation/xcodekit/creating_a_source_editor_extension | |
// | |
// - Xcode Source Editor Extension を使った Xcode プラグインの作り方 |
#import <AVFoundation/AVFoundation.h> | |
@interface EnableBackgroundAudioWrapper : NSObject | |
+ (void)enableBackgroundAudio; | |
@end | |
@implementation EnableBackgroundAudioWrapper | |
+ (void)enableBackgroundAudio { | |
AVAudioSession* audioSession = [AVAudioSession sharedInstance]; |
#import <Foundation/Foundation.h> | |
@interface ProcessInfoWrapper : NSObject | |
// 結果はNSProcessInfoThermalStateに準拠 | |
// - https://developer.apple.com/documentation/foundation/nsprocessinfothermalstate?language=objc | |
+ (int)getThermalState; | |
@end | |
@implementation ProcessInfoWrapper |
import SwiftUI | |
struct ContentView: View { | |
// Font | |
let fontSize: CGFloat = 90 | |
// Animation | |
let startScale: CGFloat = 0.3 | |
let endScale: CGFloat = 1.0 |
#if UNITY_IOS | |
using System.IO; | |
using UnityEditor; | |
using UnityEditor.Callbacks; | |
using UnityEditor.iOS.Xcode; | |
namespace Samples | |
{ | |
static class CcacheSettings | |
{ |
using System; | |
using UnityEngine; | |
using UnityEditor; | |
using System.IO; | |
using System.Linq; | |
namespace EditorUtility | |
{ | |
static class ExportProjectSettings | |
{ |
// referred to: | |
// http://baba-s.hatenablog.com/entry/2019/05/22/084000 | |
// https://forum.unity.com/threads/editorapplication-iscompiling-is-always-false.770126/ | |
using UnityEngine; | |
using UnityEditor; | |
#if UNITY_2019_1_OR_NEWER | |
using UnityEditor.Compilation; | |
#endif |
#if UNITY_EDITOR_WIN | |
using System; | |
using System.Runtime.InteropServices; | |
using System.Text; | |
using UnityEditor; | |
namespace MonafuwaUtility | |
{ | |
static class MonafuwaSweetRoomEditor | |
{ |
// refered to: | |
// - https://takachan.hatenablog.com/entry/2018/03/10/020555 | |
using System; | |
namespace Utility | |
{ | |
internal static class EndianConverter | |
{ | |
public static char Reverse(char value) => (char)Reverse((ushort)value); |