This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NSURL *downloadURL = [NSURL URLWithString:path]; | |
NSURLRequest *request = [NSURLRequest requestWithURL:downloadURL]; | |
self.downloadTask = [self.session downloadTaskWithRequest:request]; | |
[self.downloadTask resume]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (BOOL) printExistFile:(NSString*) targetFilePath | |
{ | |
// 【1. ファイルまでのパスを作成】 | |
// ダウンロードした画像が格納されたディレクトリパス取得(適宜変更してください) | |
NSArray *dirPaths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); | |
// ファイルパスの作成 | |
NSString *filePath = [[dirPaths objectAtIndex:0] stringByAppendingPathComponent:targetFilePath]; | |
// 【2. NSFileManagerを取得】 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 【1. ファイルまでのパスを作成】 | |
// ダウンロードした画像が格納されたディレクトリパス取得(適宜変更してください) | |
NSArray *dirPaths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); | |
// ファイルパスの作成 | |
NSString *filePath = [[dirPaths objectAtIndex:0] stringByAppendingPathComponent:@"img.png"]; | |
// 【2. NSFileManagerを取得】 | |
NSFileManager *fileManager = [NSFileManager defaultManager]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections; | |
using UnityEngine; | |
using DG.Tweening; | |
public class HelloWorldDOTween : MonoBehaviour | |
{ | |
void Start() | |
{ | |
transform.DOLocalMove(new Vector3(10f, 0, 0), 1f); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using UnityEngine.UIElements; | |
/// <summary> | |
/// DragAndDrop Sample | |
/// </summary> | |
[RequireComponent(typeof(UIDocument))] | |
public class UIToolkit_DragAndDropTest : MonoBehaviour | |
{ | |
private Vector2 _dragOffset; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using UnityEngine.UIElements; | |
// 解説Qiita記事 : https://qiita.com/ohbashunsuke/items/ae1da96e582aef734eee | |
[RequireComponent(typeof(UIDocument))] | |
public class UIToolkit_MouseDownUpTest : MonoBehaviour | |
{ | |
void OnEnable() | |
{ | |
var document = GetComponent<UIDocument>(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// _visualEffect.SendEvent("OnPlay"); と同じ | |
// _visualEffect.SendEvent(VisualEffectAsset.PlayEventName); と同じ | |
_visualEffect.SendEvent(VisualEffectAsset.PlayEventID); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var id = Shader.PropertyToID("イベント名"); | |
_visualEffect.SendEvent(id); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// <summary> | |
/// <para>The default name ID of the play event.</para> | |
/// </summary> | |
public static readonly int PlayEventID = Shader.PropertyToID("OnPlay"); | |
/// <summary> | |
/// <para>The default name ID of the stop event.</para> | |
/// </summary> | |
public static readonly int StopEventID = Shader.PropertyToID("OnStop"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// _visualEffect.SendEvent("OnPlay");と同じ | |
_visualEffect.SendEvent(VisualEffectAsset.PlayEventName); |