1. 터미널에서 로컬 이메일 확인(git 에 설정된 이메일과 다른 경우 git에 설정된 이메일과 같게 수정해야함.)

 
git config user.email
cs

2. 로컬 이메일 수정 방법

 
git config --global user.email 바꿀이메일주소
cs

 

'개발 > 메모' 카테고리의 다른 글

[android] 기본 세팅값 - res 폴더 세팅  (0) 2019.04.21

 

1
2
3
4
5
6
7
8
private void restart(Context context) {
    PackageManager packageManager = context.getPackageManager();
    Intent intent = packageManager.getLaunchIntentForPackage(context.getPackageName());
    ComponentName componentName = intent.getComponent();
    Intent mainIntent = Intent.makeRestartActivityTask(componentName);
    context.startActivity(mainIntent);
    Runtime.getRuntime().exit(0);
}
cs

 

참고 : stackoverflow.com/questions/6609414/how-do-i-programmatically-restart-an-android-app

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
// HashMap 저장
public void SaveUrlMap(Context context, HashMap<StringString> hashMapData) {
    SharedPreferences mmPref = context.getSharedPreferences("pref", Context.MODE_PRIVATE);
    if (mmPref != null) {
        JSONObject jsonObject = new JSONObject(hashMapData);
        String jsonString = jsonObject.toString();
        SharedPreferences.Editor editor = mmPref.edit();
        editor.remove("hashMapName").commit();
        editor.putString("hashMapName", jsonString);
        editor.commit();
    }
}
 
// HashMap 불러오기
public HashMap<StringString> LoadUrlMap(Context context) {
    HashMap<StringString> outputMap = new HashMap<StringString>();
    SharedPreferences mmPref = context.getSharedPreferences("pref", Context.MODE_PRIVATE);
    try {
        if (mmPref != null) {
            String jsonString = mmPref.getString("hashMapName", (new JSONObject()).toString());
            JSONObject jsonObject = new JSONObject(jsonString);
 
            Iterator<String> keysItr = jsonObject.keys();
            while (keysItr.hasNext()) {
                String key = keysItr.next();
                String value = (String) jsonObject.get(key);
                outputMap.put(key, value);
            }
        }
    } catch (Exception e) {
        e.printStackTrace();
    }
    return outputMap;
}
cs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
    private void SendEmail(string emailAddress, string emailTitle, string emailBody)
    {
        using (var intentClass = new AndroidJavaClass("android.content.Intent"))
        {
            using (var intentObject = new AndroidJavaObject("android.content.Intent", intentClass.GetStatic<string>("ACTION_SENDTO")))
            {
                var uriClass = new AndroidJavaClass("android.net.Uri");
                var uriObject = uriClass.CallStatic<AndroidJavaObject>("parse""mailto:");
                intentObject.Call<AndroidJavaObject>("setData", uriObject);
 
                intentObject.Call<AndroidJavaObject>("putExtra", intentClass.GetStatic<string>("EXTRA_SUBJECT"), emailTitle);
                string[] email = { emailAddress };
                intentObject.Call<AndroidJavaObject>("putExtra", intentClass.GetStatic<string>("EXTRA_EMAIL"), email);
 
                intentObject.Call<AndroidJavaObject>("putExtra", intentClass.GetStatic<string>("EXTRA_TEXT"), emailBody);
                using (var unity = new AndroidJavaClass("com.unity3d.player.UnityPlayer"))
                {
                    using (var currentActivity = unity.GetStatic<AndroidJavaObject>("currentActivity"))
                    {
                        currentActivity.Call("startActivity", intentObject);
                    }
                }
            }
        }
    }
cs

'개발 > Unity' 카테고리의 다른 글

[Unity] Inspector의 속성 on/off  (0) 2021.01.11
[Unity] open android app intent  (0) 2020.12.15
[Unity] 3D 오브젝트를 캔버스에 위치시키기  (0) 2020.10.13
[Unity] set screen orientation  (0) 2019.05.24
[Unity] cannot click button  (0) 2019.05.23
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
public void ClickLaunchApp()
    {
        bool fail = false;
        string bundleId = "com.company.appName"; // put your app bundle id
        AndroidJavaClass up = new AndroidJavaClass("com.unity3d.player.UnityPlayer");
        AndroidJavaObject ca = up.GetStatic<AndroidJavaObject>("currentActivity");
        AndroidJavaObject packageManager = ca.Call<AndroidJavaObject>("getPackageManager");
 
        AndroidJavaObject launchIntent = null;
 
        launchIntent = packageManager.Call<AndroidJavaObject>("getLaunchIntentForPackage", bundleId);
 
        if (launchIntent == null)
        {
            fail = true;
        }
 
        if (fail)
        { //open app in store
            Application.OpenURL("market://details?id=" + bundleId);
        }
        else //open the app
        {
            ca.Call("startActivity", launchIntent);
        }
        up.Dispose();
        ca.Dispose();
        packageManager.Dispose();
 
        if (launchIntent != null)
        {
            launchIntent.Dispose();
        }
    }
cs

 

 

깔깔

'개발 > Unity' 카테고리의 다른 글

[Unity] Inspector의 속성 on/off  (0) 2021.01.11
[Unity] send email android intent  (1) 2020.12.15
[Unity] 3D 오브젝트를 캔버스에 위치시키기  (0) 2020.10.13
[Unity] set screen orientation  (0) 2019.05.24
[Unity] cannot click button  (0) 2019.05.23

1. canvas 추가 -> button 추가 -> 대상 3D 오브젝트를 button의 자식으로 삽입

 

2. canvas의 Render Mode를 Screen Space - Camera로 변경 및 UICamera 추가

(UI Camera 설정 : yoon-0506.tistory.com/22)

 

3. 추가한 3D 오브젝트의 크기 조정(참고한곳에서는 100으로 설정하거나 따로 조정하는 방법을 제시함)

 

 

(참고 : forum.unity.com/threads/3d-objects-inside-canvas.266145/)

'개발 > Unity' 카테고리의 다른 글

[Unity] send email android intent  (1) 2020.12.15
[Unity] open android app intent  (0) 2020.12.15
[Unity] set screen orientation  (0) 2019.05.24
[Unity] cannot click button  (0) 2019.05.23
[Unity] UICamera  (1) 2019.05.22

+ Recent posts