This file contains hidden or 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
| void Awake() { | |
| var refDp = scaler.referenceResolution.y; | |
| var realDp = Screen.height * 160 / Screen.dpi; | |
| var factor = refDp / realDp; | |
| Debug.Log ("RefDP: " + refDp + " realDP: " + realDp + " factor: " + factor); | |
| if (factor < 1) { | |
| factor = (factor + 1) / 2f; | |
| } |
This file contains hidden or 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.shamanland.dev; | |
| import android.content.Context; | |
| import android.content.pm.PackageManager; | |
| public class Helper { | |
| public static boolean isPackageExisted(Context context, String packageName) { | |
| try { | |
| return context.getPackageManager().getApplicationInfo(packageName, 0) != null; | |
| } catch (PackageManager.NameNotFoundException ex) { |
This file contains hidden or 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
| (function() { | |
| var popup = document.querySelector("svg > g:last-child"); | |
| new MutationObserver(function(mutations, observer) { | |
| var line = ""; | |
| var text = popup.querySelectorAll("text"); | |
| for (var i = 0; i < text.length; i++) { | |
| line = line + text[i].textContent + "," | |
| } |