This change adds support for custom background images. Usage: - Background images are stored in "backgrounds" folder as with jpg or png. - Both 360 degree (equirectangular) and 6-side cubemap images are supported. This is automatically detected based on aspect ratio (with cubemap having 4:3 aspect ratio). - Select the background from Settings. Changes: - The selected background image is persisted in config in this format: "background": "backgrounds/my_background.jpg", - Image is decoded in a background thread (via Android plugin), as Texture2D.LoadImage can cause multi-second freeze on the UI thread. We then compensate for unity (re-ordering coordinate origin and also alpha channel). - Made ground smaller & semi-transparent
33 lines
597 B
C#
33 lines
597 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using TMPro;
|
|
using UnityEngine;
|
|
|
|
public class AppEntry : MonoBehaviour
|
|
{
|
|
// Sprite gameobject
|
|
public GameObject sprite;
|
|
|
|
// TMP text
|
|
public TextMeshProUGUI text;
|
|
|
|
// App entry contents
|
|
public string packageId;
|
|
public string appName;
|
|
public string externalIconPath;
|
|
public int installedApkIndex;
|
|
public bool isRenameMode;
|
|
|
|
// Start is called before the first frame update
|
|
void Start()
|
|
{
|
|
|
|
}
|
|
|
|
// Update is called once per frame
|
|
void Update()
|
|
{
|
|
|
|
}
|
|
}
|