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
package com.unity3d.player; | |
import android.app.Activity; | |
import android.app.PictureInPictureParams; | |
import android.content.Intent; | |
import android.content.res.Configuration; | |
import android.graphics.PixelFormat; | |
import android.os.Bundle; | |
import android.util.Rational; | |
import android.view.KeyEvent; |
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
<?xml version="1.0" encoding="utf-8"?> | |
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.unity3d.player" xmlns:tools="http://schemas.android.com/tools"> | |
<uses-feature android:glEsVersion="0x00030000" /> | |
<uses-feature android:name="android.hardware.vulkan.version" android:required="false" /> | |
<uses-feature android:name="android.hardware.touchscreen" android:required="false" /> | |
<uses-feature android:name="android.hardware.touchscreen.multitouch" android:required="false" /> | |
<uses-feature android:name="android.hardware.touchscreen.multitouch.distinct" android:required="false" /> | |
<application android:extractNativeLibs="true"> | |
<meta-data android:name="unity.splash-mode" android:value="0" /> | |
<meta-data android:name="unity.splash-enable" android:value="True" /> |
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; | |
[RequireComponent (typeof(MeshRenderer))] | |
[RequireComponent (typeof(MeshFilter))] | |
public class DynamicCreateMesh : MonoBehaviour | |
{ | |
[SerializeField] Material _colorMaterial; | |
private void Start () | |
{ |
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; | |
[RequireComponent (typeof(MeshRenderer))] | |
[RequireComponent (typeof(MeshFilter))] | |
public class DynamicCreateMesh : MonoBehaviour | |
{ | |
[SerializeField] Material _colorMaterial; | |
private void Start () | |
{ |
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 UnityEditor; | |
using UnityEngine; | |
/// <summary> | |
/// Sprite PivotをCustomに設定するサンプルコード | |
/// </summary> | |
public class CustomPivot : AssetPostprocessor | |
{ | |
private void OnPostprocessTexture(Texture2D target) | |
{ |
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
<TextArea onChange={(event) => { | |
const changedText = event.target.value | |
// save localStorage | |
localStorage.setItem("savekey", changedText) | |
}} | |
value = changedText | |
/> |
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); | |
} |
NewerOlder