Skip to content

Instantly share code, notes, and snippets.

using UnityEngine;
using System.Collections;
// Alt + マウス右クリックでカメラを動かす
public class MouseCamera : MonoBehaviour {
float oldMouseX = 0;
float oldMouseY = 0;
float mouseX = 0;
// URL
https://www.assetstore.unity3d.com/jp/#!/content/51519
// 係数はCoef, 定数はk_xxx
private const float k_ExpDampCoef = -20f; // Coefficient used to damp the rotation.
// メンバ変数
[SerializeField] private float m_MinYRotation = -20f; // The maximum amount the transform can rotate around the y axis in the opposite direction.
// 名前空間
using UnityEngine;
using System.Collections;
public class ReflectionProbeScript : MonoBehaviour {
public int perFrame = 3;
ReflectionProbe reflectionProbe;
void Start () {
reflectionProbe = this.GetComponent<ReflectionProbe> ();
using UnityEngine;
using UnityEngine.UI;
using System.Collections;
public class FPS : MonoBehaviour {
Text text;
int frameCount;
float prevTime;
デレステをAndroidエミュ(Genymotion)で起動する方法
build.prop内のhttp://ro.build .typeを適当な文字に変えるだけでok
エミュ判定の関数
https://gist.github.com/SpeedxPz/731dd752d9d8e3d0d097
これだけじゃ不足だったようで、Genymotionとかエミュっぽい文字列を書き換えていく
by Build Prop Editor
起動した
// 動画リストをフォルダ内のファイルから作成
string movieDir = "Assets/StreamingAssets/movie";
DirectoryInfo dir = new DirectoryInfo(movieDir);
FileInfo[] info = dir.GetFiles("*.mp4");
movieFileList = new List<string> ();
foreach (FileInfo f in info) {
string fileName = f.ToString ().Split ('/').Last();
string filePath = "movie/" + fileName;
//Debug.Log ("filePath : " + filePath);
this.movieFileList.Add (filePath);
using UnityEngine;
using System.Collections;
// 各インスタンスにAnimatorつけるのがもったいないのでAnimatorつけるのは1つにして
// 他のオブジェクトはそれをコピーする
// 1フレーム遅れるが問題ない
public class AnimationCopy : MonoBehaviour {
public Transform animationBase; // アニメーションのコピー元
IEnumerator LoadFromTextData(){
string path;
#if UNITY_EDITOR
path = "file://" + Application.streamingAssetsPath + "/TextData/PhaseTime.txt";
#else
path = Application.streamingAssetsPath + "/TextData/PhaseTime.txt";
#endif
Debug.Log ("path : " + path);
string text;
rem appディレクトリがあれば削除
rmdir /s /q app
rem apkをaptoolでデコードする
call apktool -f d app.apk
rem appというフォルダができる
rem app/assets/Movie/内を削除
del /q app\assets\Movie\*

動作確認済み環境

  • Windows7 PC
  • Android Nexus 6

環境設定

Javaをインストール