ユーザーを指定してSSH
ssh user@url
ユーザーを指定してフォルダー毎コピー
scp -r [folder] [user_name]@example.com:/home/[user_name]/www/webapp/[new folder name]
ユーザーを指定してSSH
ssh user@url
ユーザーを指定してフォルダー毎コピー
scp -r [folder] [user_name]@example.com:/home/[user_name]/www/webapp/[new folder name]
Unity の Android Plugin を Java で作成
Kotlin に移植したら以下のエラー
03-27 16:34:55.789 3261 3261 W Unity : Native libraries not loaded - dropping message for ScriptObject.OnLoadImageFromFolder
class MainActivity : Activity() {
class MainActivity : UnityPlayerActivity() {
継承もとのクラスが間違ってた…
サーバー側
mk ~/git/[folder name]
cd ~/git/[folder name]
git --bare init --share
クラアント
mk ~/work
cd ~/work
git init
echo "git test" > read.me
git add .
git commit
git push ssh://[user]@[user].sakura.ne.jp/home/[user]/git/[folder name] master
初回
git remote add origin ssh://[user]@[user].sakura.ne.jp/home/[user]/git/[folder name]
git push origin master
Clone
git clone ssh://[user]@[user].sakura.ne.jp/home/[user]/git/[folder name]
ゲームパットの動作の検証用に新しく購入。
Android や、Windows、Mac 対応なので、Android アプリのジョイステック機能を PC 上のジョイステックでデバックをするのが目的
かなり接続に苦戦!
Macの接続は、A + Start ボタンを押して、LEDが点滅したらSELECTボタンを3秒
認識は、DUALSHOCK4 Wireless Controller ?
はじめに説明書を適当に読んで接続したら Pro Controller と認識してジョイスティック機能が使えなかった。
何度か使ってると認識は、8BitDo Zero 2 gamepad になりました。
Android の接続は、B+Start ボタンを押して、LEDが点滅したらSELECTボタンを3秒
認識は、8BitDo Zero 2 gamepad
取り敢えず無事認識して使えました。
これで Android アプリのジョイステックのデバックが捗りそう。
原因としては、Active(true) と Active(false) を繰り返すとVirtual Joystick が使えなくなる
There is already a virtual axis named Horizontal1 registered.
UnityEngine.Debug:LogError(Object)
UnityStandardAssets.CrossPlatformInput.VirtualInput:RegisterVirtualAxis(VirtualAxis) (at Assets/Standard Assets/CrossPlatformInput/Scripts/VirtualInput.cs:39)
UnityStandardAssets.CrossPlatformInput.CrossPlatformInputManager:RegisterVirtualAxis(VirtualAxis) (at Assets/Standard Assets/CrossPlatformInput/Scripts/CrossPlatformInputManager.cs:59)
UnityStandardAssets.CrossPlatformInput.Joystick:CreateVirtualAxes() (at Assets/Standard Assets/CrossPlatformInput/Scripts/Joystick.cs:64)
UnityStandardAssets.CrossPlatformInput.Joystick:OnEnable() (at Assets/Standard Assets/CrossPlatformInput/Scripts/Joystick.cs:30)
UnityEngine.GameObject:SetActive(Boolean)
MainControl:onClickVr() (at Assets/_main/MainControl.cs:353)
UnityEngine.EventSystems.EventSystem:Update() (at /Applications/Unity/Hub/Editor/2019.4.20f1/Unity.app/Contents/Resources/PackageManager/BuiltInPackages/com.unity.ugui/Runtime/EventSystem/EventSystem.cs:377)
とりあえずの対処
public void RegisterVirtualAxis(CrossPlatformInputManager.VirtualAxis axis)
{
// Modified By M.Hotaka
// check if we already have an axis with that name and log and error if we do
if (m_VirtualAxes.ContainsKey(axis.name))
{
Debug.Log("There is already a virtual axis named " + axis.name + " registered.");
UnRegisterVirtualAxis(axis.name);
}
// else
{
// add any new axes
m_VirtualAxes.Add(axis.name, axis);
// if we dont want to match with the input manager setting then revert to always using virtual
if (!axis.matchWithInputManager)
{
m_AlwaysUseVirtual.Add(axis.name);
}
}
}
300円位のジョイスティック mocute-032 を購入したが、実際のボタンの値が分からず確認の為のスクリプトを作成
おそらく、汎用的に確認できます。
この値段で充電式は、驚き!
モードはゲームモードでAndroid
void Update() { UpdateGetKey(); // UpdateKey(); } void UpdateGetKey() { float horizontal = Input.GetAxis("Horizontal"); // joystick horizontal float vertical = Input.GetAxis("Vertical"); // joystick vertical Debug.Log("x y:" + horizontal + "," + vertical); foreach (KeyCode value in Enum.GetValues(typeof(KeyCode))) { if (Input.GetKey(value)) { String name = Enum.GetName(typeof(KeyCode), value); Debug.Log("Input.GetKey:" + name); } if (Input.GetKeyDown(value)) { String name = Enum.GetName(typeof(KeyCode), value); Debug.Log("Input.GetKeyDown:" + name); } if (Input.GetKeyUp(value)) { String name = Enum.GetName(typeof(KeyCode), value); Debug.Log("Input.GetKeyUp:" + name); } } }
adb logcat | grep Joy
02-24 13:42:55.463 1346 1358 I ActivityManager: START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000
02-24 13:45:54.033 2993 3016 I Unity : Input.GetKey:JoystickButton2
02-24 13:45:54.033 2993 3016 I Unity : Input.GetKeyDown:JoystickButton2
02-24 13:45:54.033 2993 3016 I Unity : Input.GetKey:Joystick1Button2
02-24 13:45:54.033 2993 3016 I Unity : Input.GetKeyDown:Joystick1Button2
02-24 13:45:54.051 2993 3016 I Unity : Input.GetKeyUp:JoystickButton2
02-24 13:45:54.051 2993 3016 I Unity : Input.GetKeyUp:Joystick1Button2
02-24 13:45:55.333 2993 3016 I Unity : Input.GetKey:JoystickButton0
02-24 13:45:55.333 2993 3016 I Unity : Input.GetKey:Joystick1Button0
02-24 13:45:55.352 2993 3016 I Unity : Input.GetKey:JoystickButton0
02-24 13:45:55.352 2993 3016 I Unity : Input.GetKey:Joystick1Button0
02-24 13:45:55.367 2993 3016 I Unity : Input.GetKey:JoystickButton0
02-24 13:45:55.367 2993 3016 I Unity : Input.GetKey:Joystick1Button0
02-24 13:45:55.383 2993 3016 I Unity : Input.GetKey:JoystickButton0
02-24 13:45:55.383 2993 3016 I Unity : Input.GetKey:Joystick1Button0
02-24 13:45:55.402 2993 3016 I Unity : Input.GetKeyUp:JoystickButton0
Google drive に遷移して、
設定->アプリの管理->アプリ追加
MindMup を選択してインストールします。
マインドマップ作成方法
ドライブ 新規を選択します。
その他、MindMup を選択します。
サンプル
OS:Catalina
Control+Command+5 で画面クリック
オプションで画面キャプチャー範囲、動画、静止画を指定
null で更新
public void updateScore(int id, ExeMode method, int? score) { string item = CommonDao.GetScoreItemName(method); // How to string format string sql = $"UPDATE LessonTable SET {item} ={(score == null ? "null" : score.ToString())} WHERE ID ={id}"; dbManager.Execute(sql); }
項目を動的に変えてデータを取得
void Start() { dbManager = this.GetComponentInParent(); } public int GetScore(int id, ExeMode method) { string item = CommonDao.GetScoreItemName(method); string sql = $"SELECT {item} FROM LessonTable WHERE ID=?"; SimpleDataTable lists = dbManager.QueryGeneric(sql, id); if(lists.rows.Count ==0 ) { return 0; } return int.Parse(lists.rows[0][0].ToString()); }