upm 2.1.8-test clean release (remove PICO SDK)

upm 2.1.8-Interaction
SuGar-456 1 month ago
parent 954fe1329e
commit c1d4d56fe3
  1. BIN
      Document~/UDEXREAL Glove SDK License Agreement.pdf
  2. 8
      HandDriver/SDK/Android Bluetooth SDK.meta
  3. 8
      HandDriver/SDK/Android Bluetooth SDK/Calibration UI.meta
  4. 6345
      HandDriver/SDK/Android Bluetooth SDK/Calibration UI/Calibration.unity
  5. 7
      HandDriver/SDK/Android Bluetooth SDK/Calibration UI/Calibration.unity.meta
  6. 8
      HandDriver/SDK/Android Bluetooth SDK/Calibration UI/Scripts.meta
  7. 257
      HandDriver/SDK/Android Bluetooth SDK/Calibration UI/Scripts/UIManager.cs
  8. 11
      HandDriver/SDK/Android Bluetooth SDK/Calibration UI/Scripts/UIManager.cs.meta
  9. 72
      HandDriver/SDK/Android Bluetooth SDK/Calibration UI/Scripts/UniGif.cs
  10. 11
      HandDriver/SDK/Android Bluetooth SDK/Calibration UI/Scripts/UniGif.cs.meta
  11. 275
      HandDriver/SDK/Android Bluetooth SDK/Calibration UI/Scripts/UniGifConst.cs
  12. 11
      HandDriver/SDK/Android Bluetooth SDK/Calibration UI/Scripts/UniGifConst.cs.meta
  13. 579
      HandDriver/SDK/Android Bluetooth SDK/Calibration UI/Scripts/UniGifDecoder.cs
  14. 11
      HandDriver/SDK/Android Bluetooth SDK/Calibration UI/Scripts/UniGifDecoder.cs.meta
  15. 56
      HandDriver/SDK/Android Bluetooth SDK/Calibration UI/Scripts/UniGifExtension.cs
  16. 11
      HandDriver/SDK/Android Bluetooth SDK/Calibration UI/Scripts/UniGifExtension.cs.meta
  17. 603
      HandDriver/SDK/Android Bluetooth SDK/Calibration UI/Scripts/UniGifFormatter.cs
  18. 11
      HandDriver/SDK/Android Bluetooth SDK/Calibration UI/Scripts/UniGifFormatter.cs.meta
  19. 388
      HandDriver/SDK/Android Bluetooth SDK/Calibration UI/Scripts/UniGifImage.cs
  20. 11
      HandDriver/SDK/Android Bluetooth SDK/Calibration UI/Scripts/UniGifImage.cs.meta
  21. 89
      HandDriver/SDK/Android Bluetooth SDK/Calibration UI/Scripts/UniGifImageAspectController.cs
  22. 11
      HandDriver/SDK/Android Bluetooth SDK/Calibration UI/Scripts/UniGifImageAspectController.cs.meta
  23. 8
      HandDriver/SDK/Android Bluetooth SDK/Calibration UI/UI.meta
  24. BIN
      HandDriver/SDK/Android Bluetooth SDK/Calibration UI/UI/Battery-icon-defualt-19_19@1x.png
  25. 135
      HandDriver/SDK/Android Bluetooth SDK/Calibration UI/UI/Battery-icon-defualt-19_19@1x.png.meta
  26. BIN
      HandDriver/SDK/Android Bluetooth SDK/Calibration UI/UI/Battery100-icon-active-19_19@1x.png
  27. 135
      HandDriver/SDK/Android Bluetooth SDK/Calibration UI/UI/Battery100-icon-active-19_19@1x.png.meta
  28. 209
      HandDriver/SDK/Android Bluetooth SDK/Calibration UI/UI/Blur.shader
  29. 10
      HandDriver/SDK/Android Bluetooth SDK/Calibration UI/UI/Blur.shader.meta
  30. 147
      HandDriver/SDK/Android Bluetooth SDK/Calibration UI/UI/BlurMaterial.mat
  31. 8
      HandDriver/SDK/Android Bluetooth SDK/Calibration UI/UI/BlurMaterial.mat.meta
  32. BIN
      HandDriver/SDK/Android Bluetooth SDK/Calibration UI/UI/Calib1.png
  33. 135
      HandDriver/SDK/Android Bluetooth SDK/Calibration UI/UI/Calib1.png.meta
  34. BIN
      HandDriver/SDK/Android Bluetooth SDK/Calibration UI/UI/Calib2.png
  35. 135
      HandDriver/SDK/Android Bluetooth SDK/Calibration UI/UI/Calib2.png.meta
  36. BIN
      HandDriver/SDK/Android Bluetooth SDK/Calibration UI/UI/Calib3.png
  37. 135
      HandDriver/SDK/Android Bluetooth SDK/Calibration UI/UI/Calib3.png.meta
  38. BIN
      HandDriver/SDK/Android Bluetooth SDK/Calibration UI/UI/Calib_Step1.gif
  39. 135
      HandDriver/SDK/Android Bluetooth SDK/Calibration UI/UI/Calib_Step1.gif.meta
  40. BIN
      HandDriver/SDK/Android Bluetooth SDK/Calibration UI/UI/Calib_Step2.gif
  41. 135
      HandDriver/SDK/Android Bluetooth SDK/Calibration UI/UI/Calib_Step2.gif.meta
  42. BIN
      HandDriver/SDK/Android Bluetooth SDK/Calibration UI/UI/Calib_Step3.gif
  43. 135
      HandDriver/SDK/Android Bluetooth SDK/Calibration UI/UI/Calib_Step3.gif.meta
  44. 88
      HandDriver/SDK/Android Bluetooth SDK/Calibration UI/UI/CircleCulling.mat
  45. 8
      HandDriver/SDK/Android Bluetooth SDK/Calibration UI/UI/CircleCulling.mat.meta
  46. 122
      HandDriver/SDK/Android Bluetooth SDK/Calibration UI/UI/CircleCulling.shader
  47. 10
      HandDriver/SDK/Android Bluetooth SDK/Calibration UI/UI/CircleCulling.shader.meta
  48. BIN
      HandDriver/SDK/Android Bluetooth SDK/Calibration UI/UI/Lglover-icon-active-70_70@1x.png
  49. 135
      HandDriver/SDK/Android Bluetooth SDK/Calibration UI/UI/Lglover-icon-active-70_70@1x.png.meta
  50. BIN
      HandDriver/SDK/Android Bluetooth SDK/Calibration UI/UI/Lglover-icon-defualt-70_70@1x.png
  51. 135
      HandDriver/SDK/Android Bluetooth SDK/Calibration UI/UI/Lglover-icon-defualt-70_70@1x.png.meta
  52. BIN
      HandDriver/SDK/Android Bluetooth SDK/Calibration UI/UI/LoadBar.png
  53. 135
      HandDriver/SDK/Android Bluetooth SDK/Calibration UI/UI/LoadBar.png.meta
  54. BIN
      HandDriver/SDK/Android Bluetooth SDK/Calibration UI/UI/LoadBarDefault.png
  55. 135
      HandDriver/SDK/Android Bluetooth SDK/Calibration UI/UI/LoadBarDefault.png.meta
  56. BIN
      HandDriver/SDK/Android Bluetooth SDK/Calibration UI/UI/Rglover-icon-active-70_70@1x.png
  57. 135
      HandDriver/SDK/Android Bluetooth SDK/Calibration UI/UI/Rglover-icon-active-70_70@1x.png.meta
  58. BIN
      HandDriver/SDK/Android Bluetooth SDK/Calibration UI/UI/Rglover-icon-defualt-70_70@1x.png
  59. 135
      HandDriver/SDK/Android Bluetooth SDK/Calibration UI/UI/Rglover-icon-defualt-70_70@1x.png.meta
  60. BIN
      HandDriver/SDK/Android Bluetooth SDK/Calibration UI/UI/Signa-icon-active-19_19@1x.png
  61. 135
      HandDriver/SDK/Android Bluetooth SDK/Calibration UI/UI/Signa-icon-active-19_19@1x.png.meta
  62. BIN
      HandDriver/SDK/Android Bluetooth SDK/Calibration UI/UI/Signa-icon-defualt-19_19@1x.png
  63. 135
      HandDriver/SDK/Android Bluetooth SDK/Calibration UI/UI/Signa-icon-defualt-19_19@1x.png.meta
  64. BIN
      HandDriver/SDK/Android Bluetooth SDK/Calibration UI/UI/back-icon-active-118_46@1x.png
  65. 135
      HandDriver/SDK/Android Bluetooth SDK/Calibration UI/UI/back-icon-active-118_46@1x.png.meta
  66. BIN
      HandDriver/SDK/Android Bluetooth SDK/Calibration UI/UI/back-icon-defualt-118_46@1x.png
  67. 135
      HandDriver/SDK/Android Bluetooth SDK/Calibration UI/UI/back-icon-defualt-118_46@1x.png.meta
  68. BIN
      HandDriver/SDK/Android Bluetooth SDK/Calibration UI/UI/bg-1080_607.5@1x.png
  69. 135
      HandDriver/SDK/Android Bluetooth SDK/Calibration UI/UI/bg-1080_607.5@1x.png.meta
  70. BIN
      HandDriver/SDK/Android Bluetooth SDK/Calibration UI/UI/cardbg-174_226@1x.png
  71. 135
      HandDriver/SDK/Android Bluetooth SDK/Calibration UI/UI/cardbg-174_226@1x.png.meta
  72. BIN
      HandDriver/SDK/Android Bluetooth SDK/Calibration UI/UI/icon-active-118_46@1x.png
  73. 135
      HandDriver/SDK/Android Bluetooth SDK/Calibration UI/UI/icon-active-118_46@1x.png.meta
  74. BIN
      HandDriver/SDK/Android Bluetooth SDK/Calibration UI/UI/icon-defualt-118_46@1x.png
  75. 135
      HandDriver/SDK/Android Bluetooth SDK/Calibration UI/UI/icon-defualt-118_46@1x.png.meta
  76. BIN
      HandDriver/SDK/Android Bluetooth SDK/Calibration UI/UI/joystick-img-step2-175x175.png
  77. 135
      HandDriver/SDK/Android Bluetooth SDK/Calibration UI/UI/joystick-img-step2-175x175.png.meta
  78. BIN
      HandDriver/SDK/Android Bluetooth SDK/Calibration UI/UI/logo-Text-white.png
  79. 135
      HandDriver/SDK/Android Bluetooth SDK/Calibration UI/UI/logo-Text-white.png.meta
  80. BIN
      HandDriver/SDK/Android Bluetooth SDK/Calibration UI/UI/mainbut-defualt-120x38.png
  81. 135
      HandDriver/SDK/Android Bluetooth SDK/Calibration UI/UI/mainbut-defualt-120x38.png.meta
  82. BIN
      HandDriver/SDK/Android Bluetooth SDK/Calibration UI/UI/quit-icon-defualt-166_60@1x-2.png
  83. 135
      HandDriver/SDK/Android Bluetooth SDK/Calibration UI/UI/quit-icon-defualt-166_60@1x-2.png.meta
  84. BIN
      HandDriver/SDK/Android Bluetooth SDK/Calibration UI/UI/quit-icon-defualt-166_60@1x.png
  85. 135
      HandDriver/SDK/Android Bluetooth SDK/Calibration UI/UI/quit-icon-defualt-166_60@1x.png.meta
  86. BIN
      HandDriver/SDK/Android Bluetooth SDK/Calibration UI/UI/start-icon- default-166_60@1x.png
  87. 135
      HandDriver/SDK/Android Bluetooth SDK/Calibration UI/UI/start-icon- default-166_60@1x.png.meta
  88. BIN
      HandDriver/SDK/Android Bluetooth SDK/Calibration UI/UI/start-icon-active-166_60@1x.png
  89. 135
      HandDriver/SDK/Android Bluetooth SDK/Calibration UI/UI/start-icon-active-166_60@1x.png.meta
  90. 8
      HandDriver/SDK/Android Bluetooth SDK/CoreScripts.meta
  91. 34
      HandDriver/SDK/Android Bluetooth SDK/CoreScripts/Auto_Cali.cs
  92. 11
      HandDriver/SDK/Android Bluetooth SDK/CoreScripts/Auto_Cali.cs.meta
  93. 997
      HandDriver/SDK/Android Bluetooth SDK/CoreScripts/BleHandDriver.cs
  94. 11
      HandDriver/SDK/Android Bluetooth SDK/CoreScripts/BleHandDriver.cs.meta
  95. 68
      HandDriver/SDK/Android Bluetooth SDK/CoreScripts/DeviceManager.cs
  96. 11
      HandDriver/SDK/Android Bluetooth SDK/CoreScripts/DeviceManager.cs.meta
  97. 11
      HandDriver/SDK/Android Bluetooth SDK/CoreScripts/Mcu2PcProto.cs
  98. 11
      HandDriver/SDK/Android Bluetooth SDK/CoreScripts/Mcu2PcProto.cs.meta
  99. 86
      HandDriver/SDK/Android Bluetooth SDK/CoreScripts/Pc2McuProto.cs
  100. 11
      HandDriver/SDK/Android Bluetooth SDK/CoreScripts/Pc2McuProto.cs.meta
  101. Some files were not shown because too many files have changed in this diff Show More

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 2d2b2b70df6ecad4c85d3fb380509587
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: f889989d24901d14095c74b70f1d63ee
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: cf161539dcd772249910b53fa509d0af
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 1ff874edd618b354999b04089cfeab6c
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

@ -0,0 +1,257 @@
using UnityEngine;
using UnityEngine.UI;
using UDE_HAND_INTERACTION;
using Unity.XR.CoreUtils;
public class UIManager : MonoBehaviour
{
public static readonly string CurrentSDKVersion = "1.5";
public XROrigin XR_Origin;
public GameObject[] Panels;
public GameObject ChoosePanel;
public GameObject JoyRangeCalibPanel;
public FingerPressController ConfirmChoose;
public FingerPressController FinRangeCalib;
private GameObject OriginPanel;
private int PanelIndex = 0;
private BleManager bleManager;
public FingerPressController[] ContinueBtns;
public FingerPressController ExitBtn;
public FingerPressController[] BackBtns;
public FingerPressController[] HeightSwitch;
public GameObject SkipCalibration;
public GameObject[] Hands;
public Sprite[] HandsIconsSet;
public Sprite[] HandsSignalSet;
public Sprite[] HandsBatterySet;
private Image[] HandsIcons = new Image[2];
private Text[] DeviceNames = new Text[2];
private Image[] HandSignals = new Image[2];
private Image[] HandsBattery = new Image[2];
private Image[] SeparateLine = new Image[2];
public Color ConnectColor;
public Color DisconnectColor;
private Color DefaultColor;
public Image[] LoadBar;
public Text[] Msg;
private bool EnterCalibrationPanel = false;
private float TimeCnt = 3;
private void Awake()
{
bleManager = GetComponent<BleManager>();
if (bleManager.handDrivers[0].UsingAndroidService || bleManager.handDrivers[1].UsingAndroidService)
{
Panels = new GameObject[1] { Panels[0] };
bleManager.UsingAndroidService = true;
}
}
void Start()
{
Panels[PanelIndex].SetActive(true);
Panels[0].transform.Find("Version").GetComponent<Text>().text = CurrentSDKVersion;
ExitBtn.OnSelect.AddListener(() => { Application.Quit(); });
foreach (var btn in ContinueBtns)
{
btn.OnSelect.AddListener(() =>
{
if(Panels.Length > 1)
{
Panels[PanelIndex++].SetActive(false);
Panels[PanelIndex].SetActive(true);
EnterCalibrationPanel = true;
TimeCnt = 3;
if(PanelIndex == 3)
{
bleManager.Calibration(0);
}
}
else
{
transform.GetChild(0).gameObject.SetActive(false);
}
});
}
foreach (var btn in BackBtns)
{
btn.OnSelect.AddListener(() =>
{
if(ChoosePanel.activeInHierarchy && PanelIndex == 1)
{
ChoosePanel.SetActive(false);
}
Panels[PanelIndex--].SetActive(false);
Panels[PanelIndex].SetActive(true);
});
}
DefaultColor = Hands[0].GetComponent<Image>().color;
for (int i = 0; i < 2; ++i)
{
HandsIcons[i] = Hands[i].transform.GetChild(0).GetComponent<Image>();
DeviceNames[i] = Hands[i].transform.GetChild(1).GetComponent<Text>();
HandSignals[i] = Hands[i].transform.GetChild(2).GetComponent<Image>();
HandsBattery[i] = Hands[i].transform.GetChild(3).GetComponent<Image>();
SeparateLine[i] = Hands[i].transform.GetChild(4).GetComponent<Image>();
}
ConfirmChoose.OnSelect.AddListener(() =>
{
bleManager.LeftSpecificConnect = ChoosePanel.GetComponent<ChooseBle>().LeftChoice;
bleManager.RightSpecificConnect = ChoosePanel.GetComponent<ChooseBle>().RightChoice;
OriginPanel.SetActive(true);
ChoosePanel.SetActive(false);
});
if(HeightSwitch.Length > 0)
{
HeightSwitch[0].OnSelect.AddListener(() =>
{
transform.root.position = new Vector3(0, 1.2f, 0.5f);
XR_Origin.transform.Find("Camera Offset").position = new Vector3(0, 1.2f, 0);
XR_Origin.transform.Find("WorldOffset").position = new Vector3(0, 1.2f, 0);
});
HeightSwitch[1].OnSelect.AddListener(() =>
{
transform.root.position = new Vector3(0, 1.6f, 0.5f);
XR_Origin.transform.Find("Camera Offset").position = new Vector3(0, 1.6f, 0);
XR_Origin.transform.Find("WorldOffset").position = new Vector3(0, 1.6f, 0);
});
}
FinRangeCalib.OnSelect.AddListener(() =>
{
bleManager.JoyRangeCalibration(false);
transform.GetChild(0).gameObject.SetActive(false);
});
}
void Update()
{
if(bleManager.NeedChooseConnect && string.IsNullOrEmpty(bleManager.LeftSpecificConnect) && string.IsNullOrEmpty(bleManager.RightSpecificConnect))
{
OriginPanel = Panels[1];
if (PanelIndex == 1)
{
Panels[1].SetActive(false);
ChoosePanel.SetActive(true);
}
var Layouts = ChoosePanel.transform.GetComponentsInChildren<GridLayoutGroup>();
int[] Indexs = new int[2] { 0, 0 };
foreach (var device in bleManager.DevicesList)
{
if (device[^1] == 'L')
{
var SpecificDevice = Layouts[0].transform.GetChild(Indexs[0]).gameObject;
SpecificDevice.SetActive(true);
SpecificDevice.transform.GetChild(0).Find("DeviceName").GetComponent<Text>().text = device;
Indexs[0]++;
}
else if(device[^1] == 'R')
{
var SpecificDevice = Layouts[1].transform.GetChild(Indexs[1]).gameObject;
SpecificDevice.SetActive(true);
SpecificDevice.transform.GetChild(0).Find("DeviceName").GetComponent<Text>().text = device;
Indexs[1]++;
}
}
}
else if(OriginPanel != null)
{
ChoosePanel.SetActive(false);
if (PanelIndex == 1)
{
Panels[1].SetActive(true);
}
}
if(!string.IsNullOrEmpty(ChoosePanel.GetComponent<ChooseBle>().LeftChoice) && !string.IsNullOrEmpty(ChoosePanel.GetComponent<ChooseBle>().RightChoice))
{
ConfirmChoose.transform.parent.gameObject.SetActive(true);
}
if (bleManager.LeftConnectState)
{
Hands[0].GetComponent<Image>().color = Color.white;
HandsIcons[0].sprite = HandsIconsSet[1];
DeviceNames[0].color = Color.white;
DeviceNames[0].text = bleManager.LeftDeviceName;
HandSignals[0].sprite = HandsSignalSet[1];
HandsBattery[0].sprite = HandsBatterySet[1];
SeparateLine[0].color = ConnectColor;
}
else
{
Hands[0].GetComponent<Image>().color = DefaultColor;
HandsIcons[0].sprite = HandsIconsSet[0];
DeviceNames[0].color = DisconnectColor;
DeviceNames[0].text = "...";
HandSignals[0].sprite = HandsSignalSet[0];
HandsBattery[0].sprite = HandsBatterySet[0];
SeparateLine[0].color = DisconnectColor;
}
if(bleManager.RightConnectState)
{
Hands[1].GetComponent<Image>().color = Color.white;
HandsIcons[1].sprite = HandsIconsSet[3];
DeviceNames[1].color = Color.white;
DeviceNames[1].text = bleManager.RightDeviceName;
HandSignals[1].sprite = HandsSignalSet[1];
HandsBattery[1].sprite = HandsBatterySet[1];
SeparateLine[1].color = ConnectColor;
}
else
{
Hands[1].GetComponent<Image>().color = DefaultColor;
HandsIcons[1].sprite = HandsIconsSet[2];
DeviceNames[1].color = DisconnectColor;
DeviceNames[1].text = "...";
HandSignals[1].sprite = HandsSignalSet[0];
HandsBattery[1].sprite = HandsBatterySet[0];
SeparateLine[1].color = DisconnectColor;
}
ContinueBtns[1].transform.parent.gameObject.SetActive(bleManager.LeftConnectState && bleManager.RightConnectState);
SkipCalibration?.SetActive(PlayerPrefs.GetInt(bleManager.LeftDeviceName) == 1 && PlayerPrefs.GetInt(bleManager.RightDeviceName) == 1);
if (PanelIndex > 2 && EnterCalibrationPanel)
{
TimeCnt -= Time.deltaTime;
if(TimeCnt >= 0)
{
LoadBar[PanelIndex - 3].fillAmount = 1 - (TimeCnt / 3);
Msg[PanelIndex - 3].text = "Preparation phase " + (int)(TimeCnt + 1) + "s";
}
else if(TimeCnt > -1)
{
LoadBar[PanelIndex - 3].fillAmount = -TimeCnt;
Msg[PanelIndex - 3].text = "Calibrating£¬Hold your pose";
}
else
{
LoadBar[PanelIndex - 3].fillAmount = 1;
bleManager.Calibration(PanelIndex - 2);
if (PanelIndex == 5)
{
EnterCalibrationPanel = false;
Panels[PanelIndex].SetActive(false);
JoyRangeCalibPanel.SetActive(true);
bleManager.JoyRangeCalibration(true);
return;
}
Panels[PanelIndex++].SetActive(false);
Panels[PanelIndex].SetActive(true);
TimeCnt = 3;
}
}
}
}

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: fad0a64d009a5414fb5ae87d3fee0855
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {fileID: 2800000, guid: 0b09374c5d8c3464e9f29b2e29f8982c, type: 3}
userData:
assetBundleName:
assetBundleVariant:

@ -0,0 +1,72 @@
/*
UniGif
Copyright (c) 2015 WestHillApps (Hironari Nishioka)
This software is released under the MIT License.
http://opensource.org/licenses/mit-license.php
*/
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public static partial class UniGif
{
/// <summary>
/// Get GIF texture list Coroutine
/// </summary>
/// <param name="bytes">GIF file byte data</param>
/// <param name="callback">Callback method(param is GIF texture list, Animation loop count, GIF image width (px), GIF image height (px))</param>
/// <param name="filterMode">Textures filter mode</param>
/// <param name="wrapMode">Textures wrap mode</param>
/// <param name="debugLog">Debug Log Flag</param>
/// <returns>IEnumerator</returns>
public static IEnumerator GetTextureListCoroutine(
byte[] bytes,
Action<List<GifTexture>, int, int, int> callback,
FilterMode filterMode = FilterMode.Bilinear,
TextureWrapMode wrapMode = TextureWrapMode.Clamp,
bool debugLog = false)
{
int loopCount = -1;
int width = 0;
int height = 0;
// Set GIF data
var gifData = new GifData();
if (SetGifData(bytes, ref gifData, debugLog) == false)
{
Debug.LogError("GIF file data set error.");
if (callback != null)
{
callback(null, loopCount, width, height);
}
yield break;
}
// Decode to textures from GIF data
List<GifTexture> gifTexList = null;
yield return DecodeTextureCoroutine(gifData, result => gifTexList = result, filterMode, wrapMode);
if (gifTexList == null || gifTexList.Count <= 0)
{
Debug.LogError("GIF texture decode error.");
if (callback != null)
{
callback(null, loopCount, width, height);
}
yield break;
}
loopCount = gifData.m_appEx.loopCount;
width = gifData.m_logicalScreenWidth;
height = gifData.m_logicalScreenHeight;
if (callback != null)
{
callback(gifTexList, loopCount, width, height);
}
yield break;
}
}

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 0d840adb74b4d7747acf6f7fd75f71c8
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

@ -0,0 +1,275 @@
/*
UniGif
Copyright (c) 2015 WestHillApps (Hironari Nishioka)
This software is released under the MIT License.
http://opensource.org/licenses/mit-license.php
*/
using System;
using System.Collections.Generic;
using System.Text;
using UnityEngine;
public static partial class UniGif
{
/// <summary>
/// Gif Texture
/// </summary>
public class GifTexture
{
// Texture
public Texture2D m_texture2d;
// Delay time until the next texture.
public float m_delaySec;
public GifTexture(Texture2D texture2d, float delaySec)
{
m_texture2d = texture2d;
m_delaySec = delaySec;
}
}
/// <summary>
/// GIF Data Format
/// </summary>
private struct GifData
{
// Signature
public byte m_sig0, m_sig1, m_sig2;
// Version
public byte m_ver0, m_ver1, m_ver2;
// Logical Screen Width
public ushort m_logicalScreenWidth;
// Logical Screen Height
public ushort m_logicalScreenHeight;
// Global Color Table Flag
public bool m_globalColorTableFlag;
// Color Resolution
public int m_colorResolution;
// Sort Flag
public bool m_sortFlag;
// Size of Global Color Table
public int m_sizeOfGlobalColorTable;
// Background Color Index
public byte m_bgColorIndex;
// Pixel Aspect Ratio
public byte m_pixelAspectRatio;
// Global Color Table
public List<byte[]> m_globalColorTable;
// ImageBlock
public List<ImageBlock> m_imageBlockList;
// GraphicControlExtension
public List<GraphicControlExtension> m_graphicCtrlExList;
// Comment Extension
public List<CommentExtension> m_commentExList;
// Plain Text Extension
public List<PlainTextExtension> m_plainTextExList;
// Application Extension
public ApplicationExtension m_appEx;
// Trailer
public byte m_trailer;
public string signature
{
get
{
char[] c = { (char)m_sig0, (char)m_sig1, (char)m_sig2 };
return new string(c);
}
}
public string version
{
get
{
char[] c = { (char)m_ver0, (char)m_ver1, (char)m_ver2 };
return new string(c);
}
}
public void Dump()
{
Debug.Log("GIF Type: " + signature + "-" + version);
Debug.Log("Image Size: " + m_logicalScreenWidth + "x" + m_logicalScreenHeight);
Debug.Log("Animation Image Count: " + m_imageBlockList.Count);
Debug.Log("Animation Loop Count (0 is infinite): " + m_appEx.loopCount);
if (m_graphicCtrlExList != null && m_graphicCtrlExList.Count > 0)
{
var sb = new StringBuilder("Animation Delay Time (1/100sec)");
for (int i = 0; i < m_graphicCtrlExList.Count; i++)
{
sb.Append(", ");
sb.Append(m_graphicCtrlExList[i].m_delayTime);
}
Debug.Log(sb.ToString());
}
Debug.Log("Application Identifier: " + m_appEx.applicationIdentifier);
Debug.Log("Application Authentication Code: " + m_appEx.applicationAuthenticationCode);
}
}
/// <summary>
/// Image Block
/// </summary>
private struct ImageBlock
{
// Image Separator
public byte m_imageSeparator;
// Image Left Position
public ushort m_imageLeftPosition;
// Image Top Position
public ushort m_imageTopPosition;
// Image Width
public ushort m_imageWidth;
// Image Height
public ushort m_imageHeight;
// Local Color Table Flag
public bool m_localColorTableFlag;
// Interlace Flag
public bool m_interlaceFlag;
// Sort Flag
public bool m_sortFlag;
// Size of Local Color Table
public int m_sizeOfLocalColorTable;
// Local Color Table
public List<byte[]> m_localColorTable;
// LZW Minimum Code Size
public byte m_lzwMinimumCodeSize;
// Block Size & Image Data List
public List<ImageDataBlock> m_imageDataList;
public struct ImageDataBlock
{
// Block Size
public byte m_blockSize;
// Image Data
public byte[] m_imageData;
}
}
/// <summary>
/// Graphic Control Extension
/// </summary>
private struct GraphicControlExtension
{
// Extension Introducer
public byte m_extensionIntroducer;
// Graphic Control Label
public byte m_graphicControlLabel;
// Block Size
public byte m_blockSize;
// Disposal Mothod
public ushort m_disposalMethod;
// Transparent Color Flag
public bool m_transparentColorFlag;
// Delay Time
public ushort m_delayTime;
// Transparent Color Index
public byte m_transparentColorIndex;
// Block Terminator
public byte m_blockTerminator;
}
/// <summary>
/// Comment Extension
/// </summary>
private struct CommentExtension
{
// Extension Introducer
public byte m_extensionIntroducer;
// Comment Label
public byte m_commentLabel;
// Block Size & Comment Data List
public List<CommentDataBlock> m_commentDataList;
public struct CommentDataBlock
{
// Block Size
public byte m_blockSize;
// Image Data
public byte[] m_commentData;
}
}
/// <summary>
/// Plain Text Extension
/// </summary>
private struct PlainTextExtension
{
// Extension Introducer
public byte m_extensionIntroducer;
// Plain Text Label
public byte m_plainTextLabel;
// Block Size
public byte m_blockSize;
// Block Size & Plain Text Data List
public List<PlainTextDataBlock> m_plainTextDataList;
public struct PlainTextDataBlock
{
// Block Size
public byte m_blockSize;
// Plain Text Data
public byte[] m_plainTextData;
}
}
/// <summary>
/// Application Extension
/// </summary>
private struct ApplicationExtension
{
// Extension Introducer
public byte m_extensionIntroducer;
// Extension Label
public byte m_extensionLabel;
// Block Size
public byte m_blockSize;
// Application Identifier
public byte m_appId1, m_appId2, m_appId3, m_appId4, m_appId5, m_appId6, m_appId7, m_appId8;
// Application Authentication Code
public byte m_appAuthCode1, m_appAuthCode2, m_appAuthCode3;
// Block Size & Application Data List
public List<ApplicationDataBlock> m_appDataList;
public struct ApplicationDataBlock
{
// Block Size
public byte m_blockSize;
// Application Data
public byte[] m_applicationData;
}
public string applicationIdentifier
{
get
{
char[] c = { (char)m_appId1, (char)m_appId2, (char)m_appId3, (char)m_appId4, (char)m_appId5, (char)m_appId6, (char)m_appId7, (char)m_appId8 };
return new string(c);
}
}
public string applicationAuthenticationCode
{
get
{
char[] c = { (char)m_appAuthCode1, (char)m_appAuthCode2, (char)m_appAuthCode3 };
return new string(c);
}
}
public int loopCount
{
get
{
if (m_appDataList == null || m_appDataList.Count < 1 ||
m_appDataList[0].m_applicationData.Length < 3 ||
m_appDataList[0].m_applicationData[0] != 0x01)
{
return 0;
}
return BitConverter.ToUInt16(m_appDataList[0].m_applicationData, 1);
}
}
}
}

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 98d26016259867047a7174f120b6e7bc
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

@ -0,0 +1,579 @@
/*
UniGif
Copyright (c) 2015 WestHillApps (Hironari Nishioka)
This software is released under the MIT License.
http://opensource.org/licenses/mit-license.php
*/
using System;
using System.Collections;
using System.Collections.Generic;
using System.Text;
using UnityEngine;
public static partial class UniGif
{
/// <summary>
/// Decode to textures from GIF data
/// </summary>
/// <param name="gifData">GIF data</param>
/// <param name="callback">Callback method(param is GIF texture list)</param>
/// <param name="filterMode">Textures filter mode</param>
/// <param name="wrapMode">Textures wrap mode</param>
/// <returns>IEnumerator</returns>
private static IEnumerator DecodeTextureCoroutine(GifData gifData, Action<List<GifTexture>> callback, FilterMode filterMode, TextureWrapMode wrapMode)
{
if (gifData.m_imageBlockList == null || gifData.m_imageBlockList.Count < 1)
{
yield break;
}
List<GifTexture> gifTexList = new List<GifTexture>(gifData.m_imageBlockList.Count);
List<ushort> disposalMethodList = new List<ushort>(gifData.m_imageBlockList.Count);
int imgIndex = 0;
for (int i = 0; i < gifData.m_imageBlockList.Count; i++)
{
byte[] decodedData = GetDecodedData(gifData.m_imageBlockList[i]);
GraphicControlExtension? graphicCtrlEx = GetGraphicCtrlExt(gifData, imgIndex);
int transparentIndex = GetTransparentIndex(graphicCtrlEx);
disposalMethodList.Add(GetDisposalMethod(graphicCtrlEx));
Color32 bgColor;
List<byte[]> colorTable = GetColorTableAndSetBgColor(gifData, gifData.m_imageBlockList[i], transparentIndex, out bgColor);
yield return 0;
bool filledTexture;
Texture2D tex = CreateTexture2D(gifData, gifTexList, imgIndex, disposalMethodList, bgColor, filterMode, wrapMode, out filledTexture);
yield return 0;
// Set pixel data
int dataIndex = 0;
// Reverse set pixels. because GIF data starts from the top left.
for (int y = tex.height - 1; y >= 0; y--)
{
SetTexturePixelRow(tex, y, gifData.m_imageBlockList[i], decodedData, ref dataIndex, colorTable, bgColor, transparentIndex, filledTexture);
}
tex.Apply();
yield return 0;
float delaySec = GetDelaySec(graphicCtrlEx);
// Add to GIF texture list
gifTexList.Add(new GifTexture(tex, delaySec));
imgIndex++;
}
if (callback != null)
{
callback(gifTexList);
}
yield break;
}
#region Call from DecodeTexture methods
/// <summary>
/// Get decoded image data from ImageBlock
/// </summary>
private static byte[] GetDecodedData(ImageBlock imgBlock)
{
// Combine LZW compressed data
List<byte> lzwData = new List<byte>();
for (int i = 0; i < imgBlock.m_imageDataList.Count; i++)
{
for (int k = 0; k < imgBlock.m_imageDataList[i].m_imageData.Length; k++)
{
lzwData.Add(imgBlock.m_imageDataList[i].m_imageData[k]);
}
}
// LZW decode
int needDataSize = imgBlock.m_imageHeight * imgBlock.m_imageWidth;
byte[] decodedData = DecodeGifLZW(lzwData, imgBlock.m_lzwMinimumCodeSize, needDataSize);
// Sort interlace GIF
if (imgBlock.m_interlaceFlag)
{
decodedData = SortInterlaceGifData(decodedData, imgBlock.m_imageWidth);
}
return decodedData;
}
/// <summary>
/// Get color table and set background color (local or global)
/// </summary>
private static List<byte[]> GetColorTableAndSetBgColor(GifData gifData, ImageBlock imgBlock, int transparentIndex, out Color32 bgColor)
{
List<byte[]> colorTable = imgBlock.m_localColorTableFlag ? imgBlock.m_localColorTable : gifData.m_globalColorTableFlag ? gifData.m_globalColorTable : null;
if (colorTable != null)
{
// Set background color from color table
byte[] bgRgb = colorTable[gifData.m_bgColorIndex];
bgColor = new Color32(bgRgb[0], bgRgb[1], bgRgb[2], (byte)(transparentIndex == gifData.m_bgColorIndex ? 0 : 255));
}
else
{
bgColor = Color.black;
}
return colorTable;
}
/// <summary>
/// Get GraphicControlExtension from GifData
/// </summary>
private static GraphicControlExtension? GetGraphicCtrlExt(GifData gifData, int imgBlockIndex)
{
if (gifData.m_graphicCtrlExList != null && gifData.m_graphicCtrlExList.Count > imgBlockIndex)
{
return gifData.m_graphicCtrlExList[imgBlockIndex];
}
return null;
}
/// <summary>
/// Get transparent color index from GraphicControlExtension
/// </summary>
private static int GetTransparentIndex(GraphicControlExtension? graphicCtrlEx)
{
int transparentIndex = -1;
if (graphicCtrlEx != null && graphicCtrlEx.Value.m_transparentColorFlag)
{
transparentIndex = graphicCtrlEx.Value.m_transparentColorIndex;
}
return transparentIndex;
}
/// <summary>
/// Get delay seconds from GraphicControlExtension
/// </summary>
private static float GetDelaySec(GraphicControlExtension? graphicCtrlEx)
{
// Get delay sec from GraphicControlExtension
float delaySec = graphicCtrlEx != null ? graphicCtrlEx.Value.m_delayTime / 100f : (1f / 60f);
if (delaySec <= 0f)
{
delaySec = 0.1f;
}
return delaySec;
}
/// <summary>
/// Get disposal method from GraphicControlExtension
/// </summary>
private static ushort GetDisposalMethod(GraphicControlExtension? graphicCtrlEx)
{
return graphicCtrlEx != null ? graphicCtrlEx.Value.m_disposalMethod : (ushort)2;
}
/// <summary>
/// Create Texture2D object and initial settings
/// </summary>
private static Texture2D CreateTexture2D(GifData gifData, List<GifTexture> gifTexList, int imgIndex, List<ushort> disposalMethodList, Color32 bgColor, FilterMode filterMode, TextureWrapMode wrapMode, out bool filledTexture)
{
filledTexture = false;
// Create texture
Texture2D tex = new Texture2D(gifData.m_logicalScreenWidth, gifData.m_logicalScreenHeight, TextureFormat.ARGB32, false);
tex.filterMode = filterMode;
tex.wrapMode = wrapMode;
// Check dispose
ushort disposalMethod = imgIndex > 0 ? disposalMethodList[imgIndex - 1] : (ushort)2;
int useBeforeIndex = -1;
if (disposalMethod == 0)
{
// 0 (No disposal specified)
}
else if (disposalMethod == 1)
{
// 1 (Do not dispose)
useBeforeIndex = imgIndex - 1;
}
else if (disposalMethod == 2)
{
// 2 (Restore to background color)
filledTexture = true;
Color32[] pix = new Color32[tex.width * tex.height];
for (int i = 0; i < pix.Length; i++)
{
pix[i] = bgColor;
}
tex.SetPixels32(pix);
tex.Apply();
}
else if (disposalMethod == 3)
{
// 3 (Restore to previous)
for (int i = imgIndex - 1; i >= 0; i--)
{
if (disposalMethodList[i] == 0 || disposalMethodList[i] == 1)
{
useBeforeIndex = i;
break;
}
}
}
if (useBeforeIndex >= 0)
{
filledTexture = true;
Color32[] pix = gifTexList[useBeforeIndex].m_texture2d.GetPixels32();
tex.SetPixels32(pix);
tex.Apply();
}
return tex;
}
/// <summary>
/// Set texture pixel row
/// </summary>
private static void SetTexturePixelRow(Texture2D tex, int y, ImageBlock imgBlock, byte[] decodedData, ref int dataIndex, List<byte[]> colorTable, Color32 bgColor, int transparentIndex, bool filledTexture)
{
// Row no (0~)
int row = tex.height - 1 - y;
for (int x = 0; x < tex.width; x++)
{
// Line no (0~)
int line = x;
// Out of image blocks
if (row < imgBlock.m_imageTopPosition ||
row >= imgBlock.m_imageTopPosition + imgBlock.m_imageHeight ||
line < imgBlock.m_imageLeftPosition ||
line >= imgBlock.m_imageLeftPosition + imgBlock.m_imageWidth)
{
// Get pixel color from bg color
if (filledTexture == false)
{
tex.SetPixel(x, y, bgColor);
}
continue;
}
// Out of decoded data
if (dataIndex >= decodedData.Length)
{
if (filledTexture == false)
{
tex.SetPixel(x, y, bgColor);
if (dataIndex == decodedData.Length)
{
Debug.LogError("dataIndex exceeded the size of decodedData. dataIndex:" + dataIndex + " decodedData.Length:" + decodedData.Length + " y:" + y + " x:" + x);
}
}
dataIndex++;
continue;
}
// Get pixel color from color table
{
byte colorIndex = decodedData[dataIndex];
if (colorTable == null || colorTable.Count <= colorIndex)
{
if (filledTexture == false)
{
tex.SetPixel(x, y, bgColor);
if (colorTable == null)
{
Debug.LogError("colorIndex exceeded the size of colorTable. colorTable is null. colorIndex:" + colorIndex);
}
else
{
Debug.LogError("colorIndex exceeded the size of colorTable. colorTable.Count:" + colorTable.Count + " colorIndex:" + colorIndex);
}
}
dataIndex++;
continue;
}
byte[] rgb = colorTable[colorIndex];
// Set alpha
byte alpha = transparentIndex >= 0 && transparentIndex == colorIndex ? (byte)0 : (byte)255;
if (filledTexture == false || alpha != 0)
{
// Set color
Color32 col = new Color32(rgb[0], rgb[1], rgb[2], alpha);
tex.SetPixel(x, y, col);
}
}
dataIndex++;
}
}
#endregion
#region Decode LZW & Sort interrace methods
/// <summary>
/// GIF LZW decode
/// </summary>
/// <param name="compData">LZW compressed data</param>
/// <param name="lzwMinimumCodeSize">LZW minimum code size</param>
/// <param name="needDataSize">Need decoded data size</param>
/// <returns>Decoded data array</returns>
private static byte[] DecodeGifLZW(List<byte> compData, int lzwMinimumCodeSize, int needDataSize)
{
int clearCode = 0;
int finishCode = 0;
// Initialize dictionary
Dictionary<int, string> dic = new Dictionary<int, string>();
int lzwCodeSize = 0;
InitDictionary(dic, lzwMinimumCodeSize, out lzwCodeSize, out clearCode, out finishCode);
// Convert to bit array
byte[] compDataArr = compData.ToArray();
var bitData = new BitArray(compDataArr);
byte[] output = new byte[needDataSize];
int outputAddIndex = 0;
string prevEntry = null;
bool dicInitFlag = false;
int bitDataIndex = 0;
// LZW decode loop
while (bitDataIndex < bitData.Length)
{
if (dicInitFlag)
{
InitDictionary(dic, lzwMinimumCodeSize, out lzwCodeSize, out clearCode, out finishCode);
dicInitFlag = false;
}
int key = bitData.GetNumeral(bitDataIndex, lzwCodeSize);
string entry = null;
if (key == clearCode)
{
// Clear (Initialize dictionary)
dicInitFlag = true;
bitDataIndex += lzwCodeSize;
prevEntry = null;
continue;
}
else if (key == finishCode)
{
// Exit
Debug.LogWarning("early stop code. bitDataIndex:" + bitDataIndex + " lzwCodeSize:" + lzwCodeSize + " key:" + key + " dic.Count:" + dic.Count);
break;
}
else if (dic.ContainsKey(key))
{
// Output from dictionary
entry = dic[key];
}
else if (key >= dic.Count)
{
if (prevEntry != null)
{
// Output from estimation
entry = prevEntry + prevEntry[0];
}
else
{
Debug.LogWarning("It is strange that come here. bitDataIndex:" + bitDataIndex + " lzwCodeSize:" + lzwCodeSize + " key:" + key + " dic.Count:" + dic.Count);
bitDataIndex += lzwCodeSize;
continue;
}
}
else
{
Debug.LogWarning("It is strange that come here. bitDataIndex:" + bitDataIndex + " lzwCodeSize:" + lzwCodeSize + " key:" + key + " dic.Count:" + dic.Count);
bitDataIndex += lzwCodeSize;
continue;
}
// Output
// Take out 8 bits from the string.
byte[] temp = Encoding.Unicode.GetBytes(entry);
for (int i = 0; i < temp.Length; i++)
{
if (i % 2 == 0)
{
output[outputAddIndex] = temp[i];
outputAddIndex++;
}
}
if (outputAddIndex >= needDataSize)
{
// Exit
break;
}
if (prevEntry != null)
{
// Add to dictionary
dic.Add(dic.Count, prevEntry + entry[0]);
}
prevEntry = entry;
bitDataIndex += lzwCodeSize;
if (lzwCodeSize == 3 && dic.Count >= 8)
{
lzwCodeSize = 4;
}
else if (lzwCodeSize == 4 && dic.Count >= 16)
{
lzwCodeSize = 5;
}
else if (lzwCodeSize == 5 && dic.Count >= 32)
{
lzwCodeSize = 6;
}
else if (lzwCodeSize == 6 && dic.Count >= 64)
{
lzwCodeSize = 7;
}
else if (lzwCodeSize == 7 && dic.Count >= 128)
{
lzwCodeSize = 8;
}
else if (lzwCodeSize == 8 && dic.Count >= 256)
{
lzwCodeSize = 9;
}
else if (lzwCodeSize == 9 && dic.Count >= 512)
{
lzwCodeSize = 10;
}
else if (lzwCodeSize == 10 && dic.Count >= 1024)
{
lzwCodeSize = 11;
}
else if (lzwCodeSize == 11 && dic.Count >= 2048)
{
lzwCodeSize = 12;
}
else if (lzwCodeSize == 12 && dic.Count >= 4096)
{
int nextKey = bitData.GetNumeral(bitDataIndex, lzwCodeSize);
if (nextKey != clearCode)
{
dicInitFlag = true;
}
}
}
return output;
}
/// <summary>
/// Initialize dictionary
/// </summary>
/// <param name="dic">Dictionary</param>
/// <param name="lzwMinimumCodeSize">LZW minimum code size</param>
/// <param name="lzwCodeSize">out LZW code size</param>
/// <param name="clearCode">out Clear code</param>
/// <param name="finishCode">out Finish code</param>
private static void InitDictionary(Dictionary<int, string> dic, int lzwMinimumCodeSize, out int lzwCodeSize, out int clearCode, out int finishCode)
{
int dicLength = (int)Math.Pow(2, lzwMinimumCodeSize);
clearCode = dicLength;
finishCode = clearCode + 1;
dic.Clear();
for (int i = 0; i < dicLength + 2; i++)
{
dic.Add(i, ((char)i).ToString());
}
lzwCodeSize = lzwMinimumCodeSize + 1;
}
/// <summary>
/// Sort interlace GIF data
/// </summary>
/// <param name="decodedData">Decoded GIF data</param>
/// <param name="xNum">Pixel number of horizontal row</param>
/// <returns>Sorted data</returns>
private static byte[] SortInterlaceGifData(byte[] decodedData, int xNum)
{
int rowNo = 0;
int dataIndex = 0;
var newArr = new byte[decodedData.Length];
// Every 8th. row, starting with row 0.
for (int i = 0; i < newArr.Length; i++)
{
if (rowNo % 8 == 0)
{
newArr[i] = decodedData[dataIndex];
dataIndex++;
}
if (i != 0 && i % xNum == 0)
{
rowNo++;
}
}
rowNo = 0;
// Every 8th. row, starting with row 4.
for (int i = 0; i < newArr.Length; i++)
{
if (rowNo % 8 == 4)
{
newArr[i] = decodedData[dataIndex];
dataIndex++;
}
if (i != 0 && i % xNum == 0)
{
rowNo++;
}
}
rowNo = 0;
// Every 4th. row, starting with row 2.
for (int i = 0; i < newArr.Length; i++)
{
if (rowNo % 4 == 2)
{
newArr[i] = decodedData[dataIndex];
dataIndex++;
}
if (i != 0 && i % xNum == 0)
{
rowNo++;
}
}
rowNo = 0;
// Every 2nd. row, starting with row 1.
for (int i = 0; i < newArr.Length; i++)
{
if (rowNo % 8 != 0 && rowNo % 8 != 4 && rowNo % 4 != 2)
{
newArr[i] = decodedData[dataIndex];
dataIndex++;
}
if (i != 0 && i % xNum == 0)
{
rowNo++;
}
}
return newArr;
}
#endregion
}

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 372bd5e26098bb5438e9ba7b33c61e08
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

@ -0,0 +1,56 @@
using UnityEngine;
using System.Collections;
/// <summary>
/// Extension methods class
/// </summary>
public static class UniGifExtension
{
/// <summary>
/// Convert BitArray to int (Specifies the start index and bit length)
/// </summary>
/// <param name="startIndex">Start index</param>
/// <param name="bitLength">Bit length</param>
/// <returns>Converted int</returns>
public static int GetNumeral(this BitArray array, int startIndex, int bitLength)
{
var newArray = new BitArray(bitLength);
for (int i = 0; i < bitLength; i++)
{
if (array.Length <= startIndex + i)
{
newArray[i] = false;
}
else
{
bool bit = array.Get(startIndex + i);
newArray[i] = bit;
}
}
return newArray.ToNumeral();
}
/// <summary>
/// Convert BitArray to int
/// </summary>
/// <returns>Converted int</returns>
public static int ToNumeral(this BitArray array)
{
if (array == null)
{
Debug.LogError("array is nothing.");
return 0;
}
if (array.Length > 32)
{
Debug.LogError("must be at most 32 bits long.");
return 0;
}
var result = new int[1];
array.CopyTo(result, 0);
return result[0];
}
}

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 771965cf1b39b294b9c67813fc553d1e
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

@ -0,0 +1,603 @@
/*
UniGif
Copyright (c) 2015 WestHillApps (Hironari Nishioka)
This software is released under the MIT License.
http://opensource.org/licenses/mit-license.php
*/
using System;
using System.Collections.Generic;
using UnityEngine;
public static partial class UniGif
{
/// <summary>
/// Set GIF data
/// </summary>
/// <param name="gifBytes">GIF byte data</param>
/// <param name="gifData">ref GIF data</param>
/// <param name="debugLog">Debug log flag</param>
/// <returns>Result</returns>
private static bool SetGifData(byte[] gifBytes, ref GifData gifData, bool debugLog)
{
if (debugLog)
{
Debug.Log("SetGifData Start.");
}
if (gifBytes == null || gifBytes.Length <= 0)
{
Debug.LogError("bytes is nothing.");
return false;
}
int byteIndex = 0;
if (SetGifHeader(gifBytes, ref byteIndex, ref gifData) == false)
{
Debug.LogError("GIF header set error.");
return false;
}
if (SetGifBlock(gifBytes, ref byteIndex, ref gifData) == false)
{
Debug.LogError("GIF block set error.");
return false;
}
if (debugLog)
{
gifData.Dump();
Debug.Log("SetGifData Finish.");
}
return true;
}
private static bool SetGifHeader(byte[] gifBytes, ref int byteIndex, ref GifData gifData)
{
// Signature(3 Bytes)
// 0x47 0x49 0x46 (GIF)
if (gifBytes[0] != 'G' || gifBytes[1] != 'I' || gifBytes[2] != 'F')
{
Debug.LogError("This is not GIF image.");
return false;
}
gifData.m_sig0 = gifBytes[0];
gifData.m_sig1 = gifBytes[1];
gifData.m_sig2 = gifBytes[2];
// Version(3 Bytes)
// 0x38 0x37 0x61 (87a) or 0x38 0x39 0x61 (89a)
if ((gifBytes[3] != '8' || gifBytes[4] != '7' || gifBytes[5] != 'a') &&
(gifBytes[3] != '8' || gifBytes[4] != '9' || gifBytes[5] != 'a'))
{
Debug.LogError("GIF version error.\nSupported only GIF87a or GIF89a.");
return false;
}
gifData.m_ver0 = gifBytes[3];
gifData.m_ver1 = gifBytes[4];
gifData.m_ver2 = gifBytes[5];
// Logical Screen Width(2 Bytes)
gifData.m_logicalScreenWidth = BitConverter.ToUInt16(gifBytes, 6);
// Logical Screen Height(2 Bytes)
gifData.m_logicalScreenHeight = BitConverter.ToUInt16(gifBytes, 8);
// 1 Byte
{
// Global Color Table Flag(1 Bit)
gifData.m_globalColorTableFlag = (gifBytes[10] & 128) == 128; // 0b10000000
// Color Resolution(3 Bits)
switch (gifBytes[10] & 112)
{
case 112: // 0b01110000
gifData.m_colorResolution = 8;
break;
case 96: // 0b01100000
gifData.m_colorResolution = 7;
break;
case 80: // 0b01010000
gifData.m_colorResolution = 6;
break;
case 64: // 0b01000000
gifData.m_colorResolution = 5;
break;
case 48: // 0b00110000
gifData.m_colorResolution = 4;
break;
case 32: // 0b00100000
gifData.m_colorResolution = 3;
break;
case 16: // 0b00010000
gifData.m_colorResolution = 2;
break;
default:
gifData.m_colorResolution = 1;
break;
}
// Sort Flag(1 Bit)
gifData.m_sortFlag = (gifBytes[10] & 8) == 8; // 0b00001000
// Size of Global Color Table(3 Bits)
int val = (gifBytes[10] & 7) + 1;
gifData.m_sizeOfGlobalColorTable = (int)Math.Pow(2, val);
}
// Background Color Index(1 Byte)
gifData.m_bgColorIndex = gifBytes[11];
// Pixel Aspect Ratio(1 Byte)
gifData.m_pixelAspectRatio = gifBytes[12];
byteIndex = 13;
if (gifData.m_globalColorTableFlag)
{
// Global Color Table(0~255×3 Bytes)
gifData.m_globalColorTable = new List<byte[]>();
for (int i = byteIndex; i < byteIndex + (gifData.m_sizeOfGlobalColorTable * 3); i += 3)
{
gifData.m_globalColorTable.Add(new byte[] { gifBytes[i], gifBytes[i + 1], gifBytes[i + 2] });
}
byteIndex = byteIndex + (gifData.m_sizeOfGlobalColorTable * 3);
}
return true;
}
private static bool SetGifBlock(byte[] gifBytes, ref int byteIndex, ref GifData gifData)
{
try
{
int lastIndex = 0;
while (true)
{
int nowIndex = byteIndex;
if (gifBytes[nowIndex] == 0x2c)
{
// Image Block(0x2c)
SetImageBlock(gifBytes, ref byteIndex, ref gifData);
}
else if (gifBytes[nowIndex] == 0x21)
{
// Extension
switch (gifBytes[nowIndex + 1])
{
case 0xf9:
// Graphic Control Extension(0x21 0xf9)
SetGraphicControlExtension(gifBytes, ref byteIndex, ref gifData);
break;
case 0xfe:
// Comment Extension(0x21 0xfe)
SetCommentExtension(gifBytes, ref byteIndex, ref gifData);
break;
case 0x01:
// Plain Text Extension(0x21 0x01)
SetPlainTextExtension(gifBytes, ref byteIndex, ref gifData);
break;
case 0xff:
// Application Extension(0x21 0xff)
SetApplicationExtension(gifBytes, ref byteIndex, ref gifData);
break;
default:
break;
}
}
else if (gifBytes[nowIndex] == 0x3b)
{
// Trailer(1 Byte)
gifData.m_trailer = gifBytes[byteIndex];
byteIndex++;
break;
}
if (lastIndex == nowIndex)
{
Debug.LogError("Infinite loop error.");
return false;
}
lastIndex = nowIndex;
}
}
catch (Exception ex)
{
Debug.LogError(ex.Message);
return false;
}
return true;
}
private static void SetImageBlock(byte[] gifBytes, ref int byteIndex, ref GifData gifData)
{
ImageBlock ib = new ImageBlock();
// Image Separator(1 Byte)
// 0x2c
ib.m_imageSeparator = gifBytes[byteIndex];
byteIndex++;
// Image Left Position(2 Bytes)
ib.m_imageLeftPosition = BitConverter.ToUInt16(gifBytes, byteIndex);
byteIndex += 2;
// Image Top Position(2 Bytes)
ib.m_imageTopPosition = BitConverter.ToUInt16(gifBytes, byteIndex);
byteIndex += 2;
// Image Width(2 Bytes)
ib.m_imageWidth = BitConverter.ToUInt16(gifBytes, byteIndex);
byteIndex += 2;
// Image Height(2 Bytes)
ib.m_imageHeight = BitConverter.ToUInt16(gifBytes, byteIndex);
byteIndex += 2;
// 1 Byte
{
// Local Color Table Flag(1 Bit)
ib.m_localColorTableFlag = (gifBytes[byteIndex] & 128) == 128; // 0b10000000
// Interlace Flag(1 Bit)
ib.m_interlaceFlag = (gifBytes[byteIndex] & 64) == 64; // 0b01000000
// Sort Flag(1 Bit)
ib.m_sortFlag = (gifBytes[byteIndex] & 32) == 32; // 0b00100000
// Reserved(2 Bits)
// Unused
// Size of Local Color Table(3 Bits)
int val = (gifBytes[byteIndex] & 7) + 1;
ib.m_sizeOfLocalColorTable = (int)Math.Pow(2, val);
byteIndex++;
}
if (ib.m_localColorTableFlag)
{
// Local Color Table(0~255×3 Bytes)
ib.m_localColorTable = new List<byte[]>();
for (int i = byteIndex; i < byteIndex + (ib.m_sizeOfLocalColorTable * 3); i += 3)
{
ib.m_localColorTable.Add(new byte[] { gifBytes[i], gifBytes[i + 1], gifBytes[i + 2] });
}
byteIndex = byteIndex + (ib.m_sizeOfLocalColorTable * 3);
}
// LZW Minimum Code Size(1 Byte)
ib.m_lzwMinimumCodeSize = gifBytes[byteIndex];
byteIndex++;
// Block Size & Image Data List
while (true)
{
// Block Size(1 Byte)
byte blockSize = gifBytes[byteIndex];
byteIndex++;
if (blockSize == 0x00)
{
// Block Terminator(1 Byte)
break;
}
var imageDataBlock = new ImageBlock.ImageDataBlock();
imageDataBlock.m_blockSize = blockSize;
// Image Data(? Bytes)
imageDataBlock.m_imageData = new byte[imageDataBlock.m_blockSize];
for (int i = 0; i < imageDataBlock.m_imageData.Length; i++)
{
imageDataBlock.m_imageData[i] = gifBytes[byteIndex];
byteIndex++;
}
if (ib.m_imageDataList == null)
{
ib.m_imageDataList = new List<ImageBlock.ImageDataBlock>();
}
ib.m_imageDataList.Add(imageDataBlock);
}
if (gifData.m_imageBlockList == null)
{
gifData.m_imageBlockList = new List<ImageBlock>();
}
gifData.m_imageBlockList.Add(ib);
}
private static void SetGraphicControlExtension(byte[] gifBytes, ref int byteIndex, ref GifData gifData)
{
GraphicControlExtension gcEx = new GraphicControlExtension();
// Extension Introducer(1 Byte)
// 0x21
gcEx.m_extensionIntroducer = gifBytes[byteIndex];
byteIndex++;
// Graphic Control Label(1 Byte)
// 0xf9
gcEx.m_graphicControlLabel = gifBytes[byteIndex];
byteIndex++;
// Block Size(1 Byte)
// 0x04
gcEx.m_blockSize = gifBytes[byteIndex];
byteIndex++;
// 1 Byte
{
// Reserved(3 Bits)
// Unused
// Disposal Mothod(3 Bits)
// 0 (No disposal specified)
// 1 (Do not dispose)
// 2 (Restore to background color)
// 3 (Restore to previous)
switch (gifBytes[byteIndex] & 28)
{ // 0b00011100
case 4: // 0b00000100
gcEx.m_disposalMethod = 1;
break;
case 8: // 0b00001000
gcEx.m_disposalMethod = 2;
break;
case 12: // 0b00001100
gcEx.m_disposalMethod = 3;
break;
default:
gcEx.m_disposalMethod = 0;
break;
}
// User Input Flag(1 Bit)
// Unknown
// Transparent Color Flag(1 Bit)
gcEx.m_transparentColorFlag = (gifBytes[byteIndex] & 1) == 1; // 0b00000001
byteIndex++;
}
// Delay Time(2 Bytes)
gcEx.m_delayTime = BitConverter.ToUInt16(gifBytes, byteIndex);
byteIndex += 2;
// Transparent Color Index(1 Byte)
gcEx.m_transparentColorIndex = gifBytes[byteIndex];
byteIndex++;
// Block Terminator(1 Byte)
gcEx.m_blockTerminator = gifBytes[byteIndex];
byteIndex++;
if (gifData.m_graphicCtrlExList == null)
{
gifData.m_graphicCtrlExList = new List<GraphicControlExtension>();
}
gifData.m_graphicCtrlExList.Add(gcEx);
}
private static void SetCommentExtension(byte[] gifBytes, ref int byteIndex, ref GifData gifData)
{
CommentExtension commentEx = new CommentExtension();
// Extension Introducer(1 Byte)
// 0x21
commentEx.m_extensionIntroducer = gifBytes[byteIndex];
byteIndex++;
// Comment Label(1 Byte)
// 0xfe
commentEx.m_commentLabel = gifBytes[byteIndex];
byteIndex++;
// Block Size & Comment Data List
while (true)
{
// Block Size(1 Byte)
byte blockSize = gifBytes[byteIndex];
byteIndex++;
if (blockSize == 0x00)
{
// Block Terminator(1 Byte)
break;
}
var commentDataBlock = new CommentExtension.CommentDataBlock();
commentDataBlock.m_blockSize = blockSize;
// Comment Data(n Byte)
commentDataBlock.m_commentData = new byte[commentDataBlock.m_blockSize];
for (int i = 0; i < commentDataBlock.m_commentData.Length; i++)
{
commentDataBlock.m_commentData[i] = gifBytes[byteIndex];
byteIndex++;
}
if (commentEx.m_commentDataList == null)
{
commentEx.m_commentDataList = new List<CommentExtension.CommentDataBlock>();
}
commentEx.m_commentDataList.Add(commentDataBlock);
}
if (gifData.m_commentExList == null)
{
gifData.m_commentExList = new List<CommentExtension>();
}
gifData.m_commentExList.Add(commentEx);
}
private static void SetPlainTextExtension(byte[] gifBytes, ref int byteIndex, ref GifData gifData)
{
PlainTextExtension plainTxtEx = new PlainTextExtension();
// Extension Introducer(1 Byte)
// 0x21
plainTxtEx.m_extensionIntroducer = gifBytes[byteIndex];
byteIndex++;
// Plain Text Label(1 Byte)
// 0x01
plainTxtEx.m_plainTextLabel = gifBytes[byteIndex];
byteIndex++;
// Block Size(1 Byte)
// 0x0c
plainTxtEx.m_blockSize = gifBytes[byteIndex];
byteIndex++;
// Text Grid Left Position(2 Bytes)
// Not supported
byteIndex += 2;
// Text Grid Top Position(2 Bytes)
// Not supported
byteIndex += 2;
// Text Grid Width(2 Bytes)
// Not supported
byteIndex += 2;
// Text Grid Height(2 Bytes)
// Not supported
byteIndex += 2;
// Character Cell Width(1 Bytes)
// Not supported
byteIndex++;
// Character Cell Height(1 Bytes)
// Not supported
byteIndex++;
// Text Foreground Color Index(1 Bytes)
// Not supported
byteIndex++;
// Text Background Color Index(1 Bytes)
// Not supported
byteIndex++;
// Block Size & Plain Text Data List
while (true)
{
// Block Size(1 Byte)
byte blockSize = gifBytes[byteIndex];
byteIndex++;
if (blockSize == 0x00)
{
// Block Terminator(1 Byte)
break;
}
var plainTextDataBlock = new PlainTextExtension.PlainTextDataBlock();
plainTextDataBlock.m_blockSize = blockSize;
// Plain Text Data(n Byte)
plainTextDataBlock.m_plainTextData = new byte[plainTextDataBlock.m_blockSize];
for (int i = 0; i < plainTextDataBlock.m_plainTextData.Length; i++)
{
plainTextDataBlock.m_plainTextData[i] = gifBytes[byteIndex];
byteIndex++;
}
if (plainTxtEx.m_plainTextDataList == null)
{
plainTxtEx.m_plainTextDataList = new List<PlainTextExtension.PlainTextDataBlock>();
}
plainTxtEx.m_plainTextDataList.Add(plainTextDataBlock);
}
if (gifData.m_plainTextExList == null)
{
gifData.m_plainTextExList = new List<PlainTextExtension>();
}
gifData.m_plainTextExList.Add(plainTxtEx);
}
private static void SetApplicationExtension(byte[] gifBytes, ref int byteIndex, ref GifData gifData)
{
// Extension Introducer(1 Byte)
// 0x21
gifData.m_appEx.m_extensionIntroducer = gifBytes[byteIndex];
byteIndex++;
// Extension Label(1 Byte)
// 0xff
gifData.m_appEx.m_extensionLabel = gifBytes[byteIndex];
byteIndex++;
// Block Size(1 Byte)
// 0x0b
gifData.m_appEx.m_blockSize = gifBytes[byteIndex];
byteIndex++;
// Application Identifier(8 Bytes)
gifData.m_appEx.m_appId1 = gifBytes[byteIndex];
byteIndex++;
gifData.m_appEx.m_appId2 = gifBytes[byteIndex];
byteIndex++;
gifData.m_appEx.m_appId3 = gifBytes[byteIndex];
byteIndex++;
gifData.m_appEx.m_appId4 = gifBytes[byteIndex];
byteIndex++;
gifData.m_appEx.m_appId5 = gifBytes[byteIndex];
byteIndex++;
gifData.m_appEx.m_appId6 = gifBytes[byteIndex];
byteIndex++;
gifData.m_appEx.m_appId7 = gifBytes[byteIndex];
byteIndex++;
gifData.m_appEx.m_appId8 = gifBytes[byteIndex];
byteIndex++;
// Application Authentication Code(3 Bytes)
gifData.m_appEx.m_appAuthCode1 = gifBytes[byteIndex];
byteIndex++;
gifData.m_appEx.m_appAuthCode2 = gifBytes[byteIndex];
byteIndex++;
gifData.m_appEx.m_appAuthCode3 = gifBytes[byteIndex];
byteIndex++;
// Block Size & Application Data List
while (true)
{
// Block Size (1 Byte)
byte blockSize = gifBytes[byteIndex];
byteIndex++;
if (blockSize == 0x00)
{
// Block Terminator(1 Byte)
break;
}
var appDataBlock = new ApplicationExtension.ApplicationDataBlock();
appDataBlock.m_blockSize = blockSize;
// Application Data(n Byte)
appDataBlock.m_applicationData = new byte[appDataBlock.m_blockSize];
for (int i = 0; i < appDataBlock.m_applicationData.Length; i++)
{
appDataBlock.m_applicationData[i] = gifBytes[byteIndex];
byteIndex++;
}
if (gifData.m_appEx.m_appDataList == null)
{
gifData.m_appEx.m_appDataList = new List<ApplicationExtension.ApplicationDataBlock>();
}
gifData.m_appEx.m_appDataList.Add(appDataBlock);
}
}
}

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 6b8cfaf0d6a5ce74986ea45d5f539353
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

@ -0,0 +1,388 @@
/*
UniGif
Copyright (c) 2015 WestHillApps (Hironari Nishioka)
This software is released under the MIT License.
http://opensource.org/licenses/mit-license.php
*/
using System.Collections;
using System.Collections.Generic;
using System.IO;
using UnityEngine;
using UnityEngine.UI;
/// <summary>
/// Texture Animation from GIF image
/// </summary>
public class UniGifImage : MonoBehaviour
{
/// <summary>
/// This component state
/// </summary>
public enum State
{
None,
Loading,
Ready,
Playing,
Pause,
}
// Target row image
[SerializeField]
private RawImage m_rawImage;
// Image Aspect Controller
[SerializeField]
private UniGifImageAspectController m_imgAspectCtrl;
// Textures filter mode
[SerializeField]
private FilterMode m_filterMode = FilterMode.Point;
// Textures wrap mode
[SerializeField]
private TextureWrapMode m_wrapMode = TextureWrapMode.Clamp;
// Load from url on start
[SerializeField]
private bool m_loadOnStart;
// GIF image url (WEB or StreamingAssets path)
[SerializeField]
private string m_loadOnStartUrl;
// Rotating on loading
[SerializeField]
private bool m_rotateOnLoading;
// Debug log flag
[SerializeField]
private bool m_outputDebugLog;
// Decoded GIF texture list
private List<UniGif.GifTexture> m_gifTextureList;
// Delay time
private float m_delayTime;
// Texture index
private int m_gifTextureIndex;
// loop counter
private int m_nowLoopCount;
/// <summary>
/// Now state
/// </summary>
public State nowState
{
get;
private set;
}
/// <summary>
/// Animation loop count (0 is infinite)
/// </summary>
public int loopCount
{
get;
private set;
}
/// <summary>
/// Texture width (px)
/// </summary>
public int width
{
get;
private set;
}
/// <summary>
/// Texture height (px)
/// </summary>
public int height
{
get;
private set;
}
private void Awake()
{
if (m_rawImage == null)
{
m_rawImage = GetComponent<RawImage>();
}
if (m_loadOnStart)
{
SetGifFromUrl(m_loadOnStartUrl);
}
}
private void Start()
{
//if (m_rawImage == null)
//{
// m_rawImage = GetComponent<RawImage>();
//}
//if (m_loadOnStart)
//{
// SetGifFromUrl(m_loadOnStartUrl);
//}
}
private void OnDestroy()
{
Clear();
}
public void ResetGif()
{
m_rawImage.texture = m_gifTextureList[0].m_texture2d;
m_delayTime = Time.time + m_gifTextureList[0].m_delaySec;
}
float time = 0;
private void Update()
{
switch (nowState)
{
case State.None:
break;
case State.Loading:
if (m_rotateOnLoading)
{
transform.Rotate(0f, 0f, 30f * Time.deltaTime, Space.Self);
}
break;
case State.Ready:
break;
case State.Playing:
if (m_rawImage == null || m_gifTextureList == null || m_gifTextureList.Count <= 0)
{
return;
}
if (m_delayTime > Time.time)
{
return;
}
time += Time.deltaTime;
// Change texture
if (time >= 0.022f)
{
m_gifTextureIndex++;
time -= 0.022f;
}
if (m_gifTextureIndex >= m_gifTextureList.Count)
{
Stop();
m_gifTextureIndex = 0;
return;
if (loopCount > 0)
{
m_nowLoopCount++;
if (m_nowLoopCount >= loopCount)
{
Stop();
return;
}
}
}
m_rawImage.texture = m_gifTextureList[m_gifTextureIndex].m_texture2d;
m_delayTime = Time.time + m_gifTextureList[m_gifTextureIndex].m_delaySec;
break;
case State.Pause:
break;
default:
break;
}
}
public void Replay()
{
SetGifFromUrl(m_loadOnStartUrl);
}
/// <summary>
/// Set GIF texture from url
/// </summary>
/// <param name="url">GIF image url (WEB or StreamingAssets path)</param>
/// <param name="autoPlay">Auto play after decode</param>
public void SetGifFromUrl(string url, bool autoPlay = true)
{
StartCoroutine(SetGifFromUrlCoroutine(url, autoPlay));
}
/// <summary>
/// Set GIF texture from url
/// </summary>
/// <param name="url">GIF image url (WEB or StreamingAssets path)</param>
/// <param name="autoPlay">Auto play after decode</param>
/// <returns>IEnumerator</returns>
public IEnumerator SetGifFromUrlCoroutine(string url, bool autoPlay = true)
{
if (string.IsNullOrEmpty(url))
{
Debug.LogError("URL is nothing.");
yield break;
}
if (nowState == State.Loading)
{
Debug.LogWarning("Already loading.");
yield break;
}
nowState = State.Loading;
string path;
if (url.StartsWith("http"))
{
// from WEB
path = url;
}
else
{
// from StreamingAssets
path = Path.Combine(Application.streamingAssetsPath, url);
}
// Load file
using (WWW www = new WWW(path))
{
yield return www;
if (string.IsNullOrEmpty(www.error) == false)
{
Debug.LogError("File load error.\n" + www.error);
nowState = State.None;
yield break;
}
//Clear();
nowState = State.Loading;
// Get GIF textures
yield return StartCoroutine(UniGif.GetTextureListCoroutine(www.bytes, (gifTexList, loopCount, width, height) =>
{
if (gifTexList != null)
{
m_gifTextureList = gifTexList;
this.loopCount = loopCount;
this.width = width;
this.height = height;
nowState = State.Ready;
m_imgAspectCtrl.FixAspectRatio(width, height);
if (m_rotateOnLoading)
{
transform.localEulerAngles = Vector3.zero;
}
if (autoPlay)
{
Play();
}
}
else
{
Debug.LogError("Gif texture get error.");
nowState = State.None;
}
},
m_filterMode, m_wrapMode, m_outputDebugLog));
}
}
/// <summary>
/// Clear GIF texture
/// </summary>
public void Clear()
{
if (m_rawImage != null)
{
m_rawImage.texture = null;
}
if (m_gifTextureList != null)
{
for (int i = 0; i < m_gifTextureList.Count; i++)
{
if (m_gifTextureList[i] != null)
{
if (m_gifTextureList[i].m_texture2d != null)
{
Destroy(m_gifTextureList[i].m_texture2d);
m_gifTextureList[i].m_texture2d = null;
}
m_gifTextureList[i] = null;
}
}
m_gifTextureList.Clear();
m_gifTextureList = null;
}
nowState = State.None;
}
/// <summary>
/// Play GIF animation
/// </summary>
public void Play()
{
if (nowState != State.Ready)
{
Debug.LogWarning("State is not READY.");
return;
}
if (m_rawImage == null || m_gifTextureList == null || m_gifTextureList.Count <= 0)
{
Debug.LogError("Raw Image or GIF Texture is nothing.");
return;
}
nowState = State.Playing;
m_rawImage.texture = m_gifTextureList[0].m_texture2d;
m_delayTime = Time.time + m_gifTextureList[0].m_delaySec;
m_gifTextureIndex = 0;
m_nowLoopCount = 0;
}
/// <summary>
/// Stop GIF animation
/// </summary>
public void Stop()
{
if (nowState != State.Playing && nowState != State.Pause)
{
Debug.LogWarning("State is not Playing and Pause.");
return;
}
nowState = State.Ready;
}
/// <summary>
/// Pause GIF animation
/// </summary>
public void Pause()
{
if (nowState != State.Playing)
{
Debug.LogWarning("State is not Playing.");
return;
}
nowState = State.Pause;
}
/// <summary>
/// Resume GIF animation
/// </summary>
public void Resume()
{
if (nowState != State.Pause)
{
Debug.LogWarning("State is not Pause.");
return;
}
nowState = State.Playing;
}
}

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 338dace6791114f409088fc4f7904d1e
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

@ -0,0 +1,89 @@
/*
UniGif
Copyright (c) 2015 WestHillApps (Hironari Nishioka)
This software is released under the MIT License.
http://opensource.org/licenses/mit-license.php
*/
using UnityEngine;
[ExecuteInEditMode]
public class UniGifImageAspectController : MonoBehaviour
{
public int m_originalWidth;
public int m_originalHeight;
public bool m_fixOnUpdate;
private Vector2 m_lastSize = Vector2.zero;
private Vector2 m_newSize = Vector2.zero;
private RectTransform m_rectTransform;
public RectTransform rectTransform
{
get
{
return m_rectTransform != null ? m_rectTransform : (m_rectTransform = GetComponent<RectTransform>());
}
}
private void Update()
{
#if UNITY_EDITOR
if (Application.isPlaying == false)
{
FixAspectRatio();
return;
}
#endif
if (m_fixOnUpdate)
{
FixAspectRatio();
}
}
public void FixAspectRatio(int originalWidth = -1, int originalHeight = -1)
{
bool forceUpdate = false;
if (originalWidth > 0 && originalHeight > 0)
{
m_originalWidth = originalWidth;
m_originalHeight = originalHeight;
forceUpdate = true;
}
if (m_originalWidth <= 0 || m_originalHeight <= 0)
{
return;
}
bool changeX;
if (forceUpdate || m_lastSize.x != rectTransform.sizeDelta.x)
{
changeX = true;
}
else if (m_lastSize.y != rectTransform.sizeDelta.y)
{
changeX = false;
}
else
{
return;
}
if (changeX)
{
float ratio = rectTransform.sizeDelta.x / m_originalWidth;
m_newSize.Set(rectTransform.sizeDelta.x, m_originalHeight * ratio);
}
else
{
float ratio = rectTransform.sizeDelta.y / m_originalHeight;
m_newSize.Set(m_originalWidth * ratio, rectTransform.sizeDelta.y);
}
rectTransform.sizeDelta = m_newSize;
m_lastSize = rectTransform.sizeDelta;
}
}

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 6c0059e5739c78f4fba4055ceead3919
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 2b713d1120e7a3b4b80560fdcf2addf2
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

After

Width:  |  Height:  |  Size: 260 B

@ -0,0 +1,135 @@
fileFormatVersion: 2
guid: a8c7a8368439abd478c9a587ecb635d2
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 12
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
vTOnly: 0
ignoreMasterTextureLimit: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 1
aniso: 1
mipBias: 0
wrapU: 1
wrapV: 1
wrapW: 0
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 1
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 8
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
cookieLightType: 0
platformSettings:
- serializedVersion: 3
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Server
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Android
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID: 5e97eb03825dee720800000000000000
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
nameFileIdTable: {}
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

After

Width:  |  Height:  |  Size: 250 B

@ -0,0 +1,135 @@
fileFormatVersion: 2
guid: 565472ff6ed0f064cb3100091127dda7
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 12
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
vTOnly: 0
ignoreMasterTextureLimit: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 1
aniso: 1
mipBias: 0
wrapU: 1
wrapV: 1
wrapW: 0
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 1
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 8
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
cookieLightType: 0
platformSettings:
- serializedVersion: 3
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Server
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Android
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID: 5e97eb03825dee720800000000000000
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
nameFileIdTable: {}
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:

@ -0,0 +1,209 @@
// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)'
Shader "Custom/NewSurfaceShader"
{
Properties {
_Color ("Main Color", Color) = (1,1,1,1)
_BumpAmt ("Distortion", Range (0,128)) = 10
_MainTex ("Tint Color (RGB)", 2D) = "white" {}
_BumpMap ("Normalmap", 2D) = "bump" {}
_Size ("Size", Range(0, 20)) = 1
}
Category {
// We must be transparent, so other objects are drawn before this one.
Tags { "Queue"="Transparent" "IgnoreProjector"="True" "RenderType"="Opaque" }
SubShader {
// Horizontal blur
GrabPass {
Tags { "LightMode" = "Always" }
}
Pass {
Tags { "LightMode" = "Always" }
CGPROGRAM
#pragma vertex vert
#pragma fragment frag
#pragma fragmentoption ARB_precision_hint_fastest
#include "UnityCG.cginc"
struct appdata_t {
float4 vertex : POSITION;
float2 texcoord: TEXCOORD0;
};
struct v2f {
float4 vertex : POSITION;
float4 uvgrab : TEXCOORD0;
};
v2f vert (appdata_t v) {
v2f o;
o.vertex = UnityObjectToClipPos(v.vertex);
#if UNITY_UV_STARTS_AT_TOP
float scale = -1.0;
#else
float scale = 1.0;
#endif
o.uvgrab.xy = (float2(o.vertex.x, o.vertex.y*scale) + o.vertex.w) * 0.5;
o.uvgrab.zw = o.vertex.zw;
return o;
}
sampler2D _GrabTexture;
float4 _GrabTexture_TexelSize;
float _Size;
half4 frag( v2f i ) : COLOR {
// half4 col = tex2Dproj( _GrabTexture, UNITY_PROJ_COORD(i.uvgrab));
// return col;
half4 sum = half4(0,0,0,0);
#define GRABPIXEL(weight,kernelx) tex2Dproj( _GrabTexture, UNITY_PROJ_COORD(float4(i.uvgrab.x + _GrabTexture_TexelSize.x * kernelx*_Size, i.uvgrab.y, i.uvgrab.z, i.uvgrab.w))) * weight
sum += GRABPIXEL(0.05, -4.0);
sum += GRABPIXEL(0.09, -3.0);
sum += GRABPIXEL(0.12, -2.0);
sum += GRABPIXEL(0.15, -1.0);
sum += GRABPIXEL(0.18, 0.0);
sum += GRABPIXEL(0.15, +1.0);
sum += GRABPIXEL(0.12, +2.0);
sum += GRABPIXEL(0.09, +3.0);
sum += GRABPIXEL(0.05, +4.0);
return sum;
}
ENDCG
}
// Vertical blur
GrabPass {
Tags { "LightMode" = "Always" }
}
Pass {
Tags { "LightMode" = "Always" }
CGPROGRAM
#pragma vertex vert
#pragma fragment frag
#pragma fragmentoption ARB_precision_hint_fastest
#include "UnityCG.cginc"
struct appdata_t {
float4 vertex : POSITION;
float2 texcoord: TEXCOORD0;
};
struct v2f {
float4 vertex : POSITION;
float4 uvgrab : TEXCOORD0;
};
v2f vert (appdata_t v) {
v2f o;
o.vertex = UnityObjectToClipPos(v.vertex);
#if UNITY_UV_STARTS_AT_TOP
float scale = -1.0;
#else
float scale = 1.0;
#endif
o.uvgrab.xy = (float2(o.vertex.x, o.vertex.y*scale) + o.vertex.w) * 0.5;
o.uvgrab.zw = o.vertex.zw;
return o;
}
sampler2D _GrabTexture;
float4 _GrabTexture_TexelSize;
float _Size;
half4 frag( v2f i ) : COLOR {
// half4 col = tex2Dproj( _GrabTexture, UNITY_PROJ_COORD(i.uvgrab));
// return col;
half4 sum = half4(0,0,0,0);
#define GRABPIXEL(weight,kernely) tex2Dproj( _GrabTexture, UNITY_PROJ_COORD(float4(i.uvgrab.x, i.uvgrab.y + _GrabTexture_TexelSize.y * kernely*_Size, i.uvgrab.z, i.uvgrab.w))) * weight
//G(X) = (1/(sqrt(2*PI*deviation*deviation))) * exp(-(x*x / (2*deviation*deviation)))
sum += GRABPIXEL(0.05, -4.0);
sum += GRABPIXEL(0.09, -3.0);
sum += GRABPIXEL(0.12, -2.0);
sum += GRABPIXEL(0.15, -1.0);
sum += GRABPIXEL(0.18, 0.0);
sum += GRABPIXEL(0.15, +1.0);
sum += GRABPIXEL(0.12, +2.0);
sum += GRABPIXEL(0.09, +3.0);
sum += GRABPIXEL(0.05, +4.0);
return sum;
}
ENDCG
}
// Distortion
GrabPass {
Tags { "LightMode" = "Always" }
}
Pass {
Tags { "LightMode" = "Always" }
CGPROGRAM
#pragma vertex vert
#pragma fragment frag
#pragma fragmentoption ARB_precision_hint_fastest
#include "UnityCG.cginc"
struct appdata_t {
float4 vertex : POSITION;
float2 texcoord: TEXCOORD0;
};
struct v2f {
float4 vertex : POSITION;
float4 uvgrab : TEXCOORD0;
float2 uvbump : TEXCOORD1;
float2 uvmain : TEXCOORD2;
};
float _BumpAmt;
float4 _BumpMap_ST;
float4 _MainTex_ST;
v2f vert (appdata_t v) {
v2f o;
o.vertex = UnityObjectToClipPos(v.vertex);
#if UNITY_UV_STARTS_AT_TOP
float scale = -1.0;
#else
float scale = 1.0;
#endif
o.uvgrab.xy = (float2(o.vertex.x, o.vertex.y*scale) + o.vertex.w) * 0.5;
o.uvgrab.zw = o.vertex.zw;
o.uvbump = TRANSFORM_TEX( v.texcoord, _BumpMap );
o.uvmain = TRANSFORM_TEX( v.texcoord, _MainTex );
return o;
}
fixed4 _Color;
sampler2D _GrabTexture;
float4 _GrabTexture_TexelSize;
sampler2D _BumpMap;
sampler2D _MainTex;
half4 frag( v2f i ) : COLOR {
// calculate perturbed coordinates
half2 bump = UnpackNormal(tex2D( _BumpMap, i.uvbump )).rg; // we could optimize this by just reading the x y without reconstructing the Z
float2 offset = bump * _BumpAmt * _GrabTexture_TexelSize.xy;
i.uvgrab.xy = offset * i.uvgrab.z + i.uvgrab.xy;
half4 col = tex2Dproj( _GrabTexture, UNITY_PROJ_COORD(i.uvgrab));
half4 tint = tex2D( _MainTex, i.uvmain ) * _Color;
return col * tint;
}
ENDCG
}
}
}
}

@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: b9c587f0193711f40918f70de6e56dc7
ShaderImporter:
externalObjects: {}
defaultTextures: []
nonModifiableTextures: []
preprocessorOverride: 0
userData:
assetBundleName:
assetBundleVariant:

@ -0,0 +1,147 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 8
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: BlurMaterial
m_Shader: {fileID: 4800000, guid: b9c587f0193711f40918f70de6e56dc7, type: 3}
m_ValidKeywords: []
m_InvalidKeywords:
- _ALPHAPREMULTIPLY_ON
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _AlphaTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _BackTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _BumpMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailAlbedoMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailMask:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailNormalMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DownTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _EmissionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _FrontTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _LeftTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MainTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MetallicGlossMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _OcclusionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _ParallaxMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _RightTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _UpTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- unity_Lightmaps:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- unity_LightmapsInd:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- unity_ShadowMasks:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Ints: []
m_Floats:
- _Amplitude: 1
- _BumpAmt: 10
- _BumpScale: 1
- _ColorMask: 15
- _Cutoff: 0.5
- _Depthpower: 1
- _DetailNormalMapScale: 1
- _DstBlend: 10
- _Emission: 2
- _Frequency: 10
- _GlossMapScale: 1
- _Glossiness: 0.5
- _GlossyReflections: 1
- _Intensity: 2.93
- _MainTexMMBias: 0
- _Metallic: 0
- _Mode: 3
- _OcclusionStrength: 1
- _Opacity: 1
- _Parallax: 0.02
- _Pow: 1.85
- _QueueControl: -1
- _QueueOffset: 0
- _Size: 1
- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _StartFrequency: 4
- _Stencil: 0
- _StencilComp: 8
- _StencilOp: 0
- _StencilReadMask: 255
- _StencilWriteMask: 255
- _UVSec: 0
- _UseUIAlphaClip: 0
- _Useblack: 0
- _Usedepth: 0
- _ZWrite: 0
- _blurSizeXY: 4
- _d: 0
m_Colors:
- _Color: {r: 1, g: 1, b: 1, a: 1}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
- _GlowColor: {r: 1, g: 1, b: 1, a: 1}
- _RendererColor: {r: 1, g: 1, b: 1, a: 1}
m_BuildTextureStacks: []

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: fbef3ac7eb26f8d4cb9a911230043e4b
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 0
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

After

Width:  |  Height:  |  Size: 47 KiB

@ -0,0 +1,135 @@
fileFormatVersion: 2
guid: 000f50798e5a0bd4687f71a50c3594c9
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 12
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
vTOnly: 0
ignoreMasterTextureLimit: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 1
aniso: 1
mipBias: 0
wrapU: 1
wrapV: 1
wrapW: 0
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 1
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 8
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
cookieLightType: 0
platformSettings:
- serializedVersion: 3
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Server
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Android
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID: 5e97eb03825dee720800000000000000
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
nameFileIdTable: {}
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

After

Width:  |  Height:  |  Size: 72 KiB

@ -0,0 +1,135 @@
fileFormatVersion: 2
guid: e4fad83fb03fe8f45802361533bade6e
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 12
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
vTOnly: 0
ignoreMasterTextureLimit: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 1
aniso: 1
mipBias: 0
wrapU: 1
wrapV: 1
wrapW: 0
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 1
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 8
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
cookieLightType: 0
platformSettings:
- serializedVersion: 3
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Server
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Android
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID: 5e97eb03825dee720800000000000000
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
nameFileIdTable: {}
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

After

Width:  |  Height:  |  Size: 82 KiB

@ -0,0 +1,135 @@
fileFormatVersion: 2
guid: eeff450c75f719240bebd0eab7fda9b6
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 12
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
vTOnly: 0
ignoreMasterTextureLimit: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 1
aniso: 1
mipBias: 0
wrapU: 1
wrapV: 1
wrapW: 0
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 1
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 8
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
cookieLightType: 0
platformSettings:
- serializedVersion: 3
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Server
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Android
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID: 5e97eb03825dee720800000000000000
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
nameFileIdTable: {}
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

After

Width:  |  Height:  |  Size: 193 KiB

@ -0,0 +1,135 @@
fileFormatVersion: 2
guid: a80de2a87682b984aa906a9235c6dfdc
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 12
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
vTOnly: 0
ignoreMasterTextureLimit: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 1
aniso: 1
mipBias: 0
wrapU: 1
wrapV: 1
wrapW: 0
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 1
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 8
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
cookieLightType: 0
platformSettings:
- serializedVersion: 3
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Server
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Android
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID: 5e97eb03825dee720800000000000000
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
nameFileIdTable: {}
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

After

Width:  |  Height:  |  Size: 193 KiB

@ -0,0 +1,135 @@
fileFormatVersion: 2
guid: 742e0793f422a4349ad60940e735b502
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 12
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
vTOnly: 0
ignoreMasterTextureLimit: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 1
aniso: 1
mipBias: 0
wrapU: 1
wrapV: 1
wrapW: 0
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 1
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 8
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
cookieLightType: 0
platformSettings:
- serializedVersion: 3
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Server
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Android
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID: 5e97eb03825dee720800000000000000
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
nameFileIdTable: {}
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

After

Width:  |  Height:  |  Size: 175 KiB

@ -0,0 +1,135 @@
fileFormatVersion: 2
guid: fed40015d14e05442aa3f546ecf8ea9a
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 12
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
vTOnly: 0
ignoreMasterTextureLimit: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 1
aniso: 1
mipBias: 0
wrapU: 1
wrapV: 1
wrapW: 0
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 1
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 8
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
cookieLightType: 0
platformSettings:
- serializedVersion: 3
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Server
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Android
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID: 5e97eb03825dee720800000000000000
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
nameFileIdTable: {}
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:

@ -0,0 +1,88 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 8
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: CircleCulling
m_Shader: {fileID: 4800000, guid: 0e5fef5088132ad44a5918e2ef2f84b8, type: 3}
m_ValidKeywords: []
m_InvalidKeywords: []
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _BumpMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailAlbedoMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailMask:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailNormalMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _EmissionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MainTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MetallicGlossMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _OcclusionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _ParallaxMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Ints: []
m_Floats:
- _BumpScale: 1
- _ColorMask: 15
- _Cutoff: 0.5
- _DetailNormalMapScale: 1
- _DstBlend: 0
- _GlossMapScale: 1
- _Glossiness: 0.5
- _GlossyReflections: 1
- _Metallic: 0
- _Mode: 0
- _OcclusionStrength: 1
- _Parallax: 0.02
- _Radius: 0.5
- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _Stencil: 0
- _StencilComp: 8
- _StencilOp: 0
- _StencilReadMask: 255
- _StencilWriteMask: 255
- _UVSec: 0
- _UseUIAlphaClip: 0
- _ZWrite: 1
m_Colors:
- _Color: {r: 1, g: 1, b: 1, a: 1}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
m_BuildTextureStacks: []

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 32e0d1b3b160e924c958888511c6148c
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 2100000
userData:
assetBundleName:
assetBundleVariant:

@ -0,0 +1,122 @@
Shader "Custom/CircleCulling"
{
Properties
{
[PerRendererData] _MainTex("Sprite Texture", 2D) = "white" {}
_Color("Tint", Color) = (1,1,1,1)
_StencilComp("Stencil Comparison", Float) = 8
_Stencil("Stencil ID", Float) = 0
_StencilOp("Stencil Operation", Float) = 0
_StencilWriteMask("Stencil Write Mask", Float) = 255
_StencilReadMask("Stencil Read Mask", Float) = 255
_ColorMask("Color Mask", Float) = 15
//my member
_Radius("Circle Radius",Range(0,0.5)) = 0.3
[Toggle(UNITY_UI_ALPHACLIP)] _UseUIAlphaClip("Use Alpha Clip", Float) = 0
}
SubShader
{
Tags
{
"Queue" = "Transparent"
"IgnoreProjector" = "True"
"RenderType" = "Transparent"
"PreviewType" = "Plane"
"CanUseSpriteAtlas" = "True"
}
Stencil
{
Ref[_Stencil]
Comp[_StencilComp]
Pass[_StencilOp]
ReadMask[_StencilReadMask]
WriteMask[_StencilWriteMask]
}
Cull Off
Lighting Off
ZWrite Off
ZTest[unity_GUIZTestMode]
Blend SrcAlpha OneMinusSrcAlpha
ColorMask[_ColorMask]
Pass
{
Name "Default"
CGPROGRAM
#pragma vertex vert
#pragma fragment frag
#pragma target 2.0
#include "UnityCG.cginc"
#include "UnityUI.cginc"
#pragma multi_compile __ UNITY_UI_ALPHACLIP
#define PI 3.1415926
struct appdata_t
{
float4 vertex : POSITION;
float4 color : COLOR;
float2 texcoord : TEXCOORD0;
UNITY_VERTEX_INPUT_INSTANCE_ID
};
struct v2f
{
float4 vertex : SV_POSITION;
fixed4 color : COLOR;
float2 texcoord : TEXCOORD0;
float4 worldPosition : TEXCOORD1;
UNITY_VERTEX_OUTPUT_STEREO
};
fixed4 _Color;
fixed4 _TextureSampleAdd;
float4 _ClipRect;
float _Radius;
v2f vert(appdata_t IN)
{
v2f OUT;
UNITY_SETUP_INSTANCE_ID(IN);
UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(OUT);
OUT.worldPosition = IN.vertex;
OUT.vertex = UnityObjectToClipPos(OUT.worldPosition);
OUT.texcoord = IN.texcoord;
OUT.color = IN.color * _Color;
return OUT;
}
sampler2D _MainTex;
fixed4 frag(v2f IN) : SV_Target
{
float2 uv = IN.texcoord.xy;
float4 col = IN.color;
float2 nor =float2(0.5,0.5)-uv;
if (length(nor)>_Radius)
col.a = 0;
clip(col.w-0.01);
half4 color = (tex2D(_MainTex,uv) + _TextureSampleAdd) * col;
color.a *= UnityGet2DClipping(IN.worldPosition.xy, _ClipRect);
#ifdef UNITY_UI_ALPHACLIP
clip(color.a - 0.001);
#endif
return color;
}
ENDCG
}
}
}

@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: 0e5fef5088132ad44a5918e2ef2f84b8
ShaderImporter:
externalObjects: {}
defaultTextures: []
nonModifiableTextures: []
preprocessorOverride: 0
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

@ -0,0 +1,135 @@
fileFormatVersion: 2
guid: 3e3a4cf81099d7b4c9e98c7fd5e5c795
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 12
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
vTOnly: 0
ignoreMasterTextureLimit: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 1
aniso: 1
mipBias: 0
wrapU: 1
wrapV: 1
wrapW: 0
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 1
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 8
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
cookieLightType: 0
platformSettings:
- serializedVersion: 3
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Server
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Android
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID: 5e97eb03825dee720800000000000000
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
nameFileIdTable: {}
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

@ -0,0 +1,135 @@
fileFormatVersion: 2
guid: 38bcc8ff402e1c54cae7d6ab64532fb1
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 12
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
vTOnly: 0
ignoreMasterTextureLimit: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 1
aniso: 1
mipBias: 0
wrapU: 1
wrapV: 1
wrapW: 0
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 1
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 8
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
cookieLightType: 0
platformSettings:
- serializedVersion: 3
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Server
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Android
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID: 5e97eb03825dee720800000000000000
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
nameFileIdTable: {}
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.8 KiB

@ -0,0 +1,135 @@
fileFormatVersion: 2
guid: f28939b0192af8948a5cdd4646e29d39
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 12
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
vTOnly: 0
ignoreMasterTextureLimit: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 1
aniso: 1
mipBias: 0
wrapU: 1
wrapV: 1
wrapW: 0
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 1
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 8
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
cookieLightType: 0
platformSettings:
- serializedVersion: 3
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Server
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Android
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID: 5e97eb03825dee720800000000000000
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
nameFileIdTable: {}
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.5 KiB

@ -0,0 +1,135 @@
fileFormatVersion: 2
guid: da7d54ecd780f9440b6ba7c65c4a02f2
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 12
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
vTOnly: 0
ignoreMasterTextureLimit: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 1
aniso: 1
mipBias: 0
wrapU: 1
wrapV: 1
wrapW: 0
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 1
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 8
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
cookieLightType: 0
platformSettings:
- serializedVersion: 3
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Server
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Android
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID: 5e97eb03825dee720800000000000000
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
nameFileIdTable: {}
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

@ -0,0 +1,135 @@
fileFormatVersion: 2
guid: d7f0c3254aa86ff499afd0f29154c077
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 12
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
vTOnly: 0
ignoreMasterTextureLimit: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 1
aniso: 1
mipBias: 0
wrapU: 1
wrapV: 1
wrapW: 0
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 1
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 8
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
cookieLightType: 0
platformSettings:
- serializedVersion: 3
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Server
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Android
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID: 5e97eb03825dee720800000000000000
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
nameFileIdTable: {}
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

@ -0,0 +1,135 @@
fileFormatVersion: 2
guid: 8585700e62ffd614c9d9811a9bb30e3d
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 12
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
vTOnly: 0
ignoreMasterTextureLimit: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 1
aniso: 1
mipBias: 0
wrapU: 1
wrapV: 1
wrapW: 0
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 1
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 8
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
cookieLightType: 0
platformSettings:
- serializedVersion: 3
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Server
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Android
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID: 5e97eb03825dee720800000000000000
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
nameFileIdTable: {}
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

After

Width:  |  Height:  |  Size: 416 B

@ -0,0 +1,135 @@
fileFormatVersion: 2
guid: 83ee19fec453b8c44aad9b79c46b38f3
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 12
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
vTOnly: 0
ignoreMasterTextureLimit: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 1
aniso: 1
mipBias: 0
wrapU: 1
wrapV: 1
wrapW: 0
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 1
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 8
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
cookieLightType: 0
platformSettings:
- serializedVersion: 3
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Server
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Android
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID: 5e97eb03825dee720800000000000000
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
nameFileIdTable: {}
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

After

Width:  |  Height:  |  Size: 506 B

@ -0,0 +1,135 @@
fileFormatVersion: 2
guid: 9578dc4aa6f3772458a1b8dfd87983cf
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 12
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
vTOnly: 0
ignoreMasterTextureLimit: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 1
aniso: 1
mipBias: 0
wrapU: 1
wrapV: 1
wrapW: 0
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 1
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 8
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
cookieLightType: 0
platformSettings:
- serializedVersion: 3
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Server
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Android
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID: 5e97eb03825dee720800000000000000
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
nameFileIdTable: {}
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

@ -0,0 +1,135 @@
fileFormatVersion: 2
guid: c3c009733ada58046bb17d41343b58c6
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 12
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
vTOnly: 0
ignoreMasterTextureLimit: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 1
aniso: 1
mipBias: 0
wrapU: 1
wrapV: 1
wrapW: 0
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 1
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 8
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
cookieLightType: 0
platformSettings:
- serializedVersion: 3
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Server
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Android
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID: 5e97eb03825dee720800000000000000
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
nameFileIdTable: {}
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

@ -0,0 +1,135 @@
fileFormatVersion: 2
guid: c002c6999ff14504b9c7c67c76774664
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 12
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
vTOnly: 0
ignoreMasterTextureLimit: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 1
aniso: 1
mipBias: 0
wrapU: 1
wrapV: 1
wrapW: 0
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 1
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 8
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
cookieLightType: 0
platformSettings:
- serializedVersion: 3
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Server
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Android
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID: 5e97eb03825dee720800000000000000
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
nameFileIdTable: {}
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

After

Width:  |  Height:  |  Size: 131 KiB

@ -0,0 +1,135 @@
fileFormatVersion: 2
guid: ed8e10304fe4e7f47a1dad18cc91bb94
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 12
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
vTOnly: 0
ignoreMasterTextureLimit: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 1
aniso: 1
mipBias: 0
wrapU: 1
wrapV: 1
wrapW: 0
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 1
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 8
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
cookieLightType: 0
platformSettings:
- serializedVersion: 3
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Server
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Android
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID: 5e97eb03825dee720800000000000000
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
nameFileIdTable: {}
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

@ -0,0 +1,135 @@
fileFormatVersion: 2
guid: ca2306eaf537341468c9f72e52e869a0
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 12
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
vTOnly: 0
ignoreMasterTextureLimit: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 1
aniso: 1
mipBias: 0
wrapU: 1
wrapV: 1
wrapW: 0
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 1
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 8
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
cookieLightType: 0
platformSettings:
- serializedVersion: 3
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Server
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Android
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID: 5e97eb03825dee720800000000000000
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
nameFileIdTable: {}
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

After

Width:  |  Height:  |  Size: 952 B

@ -0,0 +1,135 @@
fileFormatVersion: 2
guid: 0d51ae807a3b41049898e71fdcbde6bb
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 12
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
vTOnly: 0
ignoreMasterTextureLimit: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 1
aniso: 1
mipBias: 0
wrapU: 1
wrapV: 1
wrapW: 0
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 1
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 8
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
cookieLightType: 0
platformSettings:
- serializedVersion: 3
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Server
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Android
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID: 5e97eb03825dee720800000000000000
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
nameFileIdTable: {}
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

After

Width:  |  Height:  |  Size: 1015 B

@ -0,0 +1,135 @@
fileFormatVersion: 2
guid: 3a4ea47bcb1e069488383d2f732a7782
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 12
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
vTOnly: 0
ignoreMasterTextureLimit: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 1
aniso: 1
mipBias: 0
wrapU: 1
wrapV: 1
wrapW: 0
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 1
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 8
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
cookieLightType: 0
platformSettings:
- serializedVersion: 3
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Server
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Android
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID: 5e97eb03825dee720800000000000000
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
nameFileIdTable: {}
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

After

Width:  |  Height:  |  Size: 45 KiB

@ -0,0 +1,135 @@
fileFormatVersion: 2
guid: ad70a822a14754f40910ec836f222144
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 12
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
vTOnly: 0
ignoreMasterTextureLimit: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 1
aniso: 1
mipBias: 0
wrapU: 1
wrapV: 1
wrapW: 0
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 1
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 8
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
cookieLightType: 0
platformSettings:
- serializedVersion: 3
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Server
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Android
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID: 5e97eb03825dee720800000000000000
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
nameFileIdTable: {}
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

@ -0,0 +1,135 @@
fileFormatVersion: 2
guid: 508c61c3a7e19aa488a8cea4c5926d9a
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 12
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
vTOnly: 0
ignoreMasterTextureLimit: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 1
aniso: 1
mipBias: 0
wrapU: 1
wrapV: 1
wrapW: 0
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 1
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 8
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
cookieLightType: 0
platformSettings:
- serializedVersion: 3
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Server
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Android
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID: 5e97eb03825dee720800000000000000
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
nameFileIdTable: {}
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

@ -0,0 +1,135 @@
fileFormatVersion: 2
guid: 856db57569423ab48b84471d9e845206
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 12
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
vTOnly: 0
ignoreMasterTextureLimit: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 1
aniso: 1
mipBias: 0
wrapU: 1
wrapV: 1
wrapW: 0
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 1
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 8
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
cookieLightType: 0
platformSettings:
- serializedVersion: 3
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Server
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Android
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID: 5e97eb03825dee720800000000000000
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
nameFileIdTable: {}
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

@ -0,0 +1,135 @@
fileFormatVersion: 2
guid: 344b0f09bb7e9854b9a69b91e5e44965
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 12
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
vTOnly: 0
ignoreMasterTextureLimit: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 1
aniso: 1
mipBias: 0
wrapU: 1
wrapV: 1
wrapW: 0
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 1
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 8
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
cookieLightType: 0
platformSettings:
- serializedVersion: 3
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Server
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Android
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID: 5e97eb03825dee720800000000000000
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
nameFileIdTable: {}
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

@ -0,0 +1,135 @@
fileFormatVersion: 2
guid: 518b31526be913d4ba214d58f6da6ae3
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 12
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
vTOnly: 0
ignoreMasterTextureLimit: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 1
aniso: 1
mipBias: 0
wrapU: 1
wrapV: 1
wrapW: 0
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 1
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 8
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
cookieLightType: 0
platformSettings:
- serializedVersion: 3
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Server
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Android
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID: 5e97eb03825dee720800000000000000
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
nameFileIdTable: {}
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

@ -0,0 +1,135 @@
fileFormatVersion: 2
guid: f9c2702ddf357274fae2883b479440ba
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 12
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
vTOnly: 0
ignoreMasterTextureLimit: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 1
aniso: 1
mipBias: 0
wrapU: 1
wrapV: 1
wrapW: 0
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 1
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 8
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
cookieLightType: 0
platformSettings:
- serializedVersion: 3
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Server
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Android
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID: 5e97eb03825dee720800000000000000
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
nameFileIdTable: {}
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

@ -0,0 +1,135 @@
fileFormatVersion: 2
guid: 7edaa1bd50d189845a3bfed19c49af34
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 12
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
vTOnly: 0
ignoreMasterTextureLimit: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 1
aniso: 1
mipBias: 0
wrapU: 1
wrapV: 1
wrapW: 0
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 1
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 8
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
cookieLightType: 0
platformSettings:
- serializedVersion: 3
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Server
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Android
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID: 5e97eb03825dee720800000000000000
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
nameFileIdTable: {}
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: a8e85962969665645ad86f1ea0ff1dfc
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

@ -0,0 +1,34 @@
namespace Auto_Calibration
{
public class Auto_Cali
{
public static double[] AutoCali(double[] f, double[] n, double[] h, float nn)
{
double[] array = new double[12];
for (int i = 0; i < 12; i++)
{
//if (f[i] < n[i])
//{
// h[i] = h[i] - f[i] + n[i];
// n[i] = f[i];
//}
//if (f[i] > h[i])
//{
// n[i] = n[i] + f[i] - h[i];
// h[i] = f[i];
//}
if (h[i] <= n[i])
{
array[i] = 0;
continue;
}
array[i] = (f[i] - n[i]) / (h[i] - n[i]) * (double)nn;
}
return array;
}
}
}

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 035f3468081166f45854ee501919b8b1
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {fileID: 2800000, guid: 0b09374c5d8c3464e9f29b2e29f8982c, type: 3}
userData:
assetBundleName:
assetBundleVariant:

@ -0,0 +1,997 @@
using Auto_Calibration;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using UnityEngine;
public class BleHandDriver : MonoBehaviour
{
private AndroidJavaClass AR1_linear_AA;
private AndroidJavaClass AR1_linear_AD;
private AndroidJavaClass AR1_linear_AE;
private AndroidJavaClass AR1_linear_AG;
private string Version;
public BleHandDriver(string _DeviceName)
{
DeviceName = _DeviceName;
if (PlayerPrefs.GetFloat($"{DeviceName}_X_Center") != 0)
{
x_center_data = PlayerPrefs.GetFloat($"{DeviceName}_X_Center");
}
if (PlayerPrefs.GetFloat($"{DeviceName}_Y_Center") != 0)
{
y_center_data = PlayerPrefs.GetFloat($"{DeviceName}_Y_Center");
}
if (PlayerPrefs.GetFloat($"{DeviceName}_X_MAX") != 0)
{
x_max_data = PlayerPrefs.GetFloat($"{DeviceName}_X_MAX");
}
if (PlayerPrefs.GetFloat($"{DeviceName}_Y_MAX") != 0)
{
y_max_data = PlayerPrefs.GetFloat($"{DeviceName}_Y_MAX");
}
if (PlayerPrefs.GetFloat($"{DeviceName}_X_MIN") != 0)
{
x_min_data = PlayerPrefs.GetFloat($"{DeviceName}_X_MIN");
}
if (PlayerPrefs.GetFloat($"{DeviceName}_Y_MIN") != 0)
{
y_min_data = PlayerPrefs.GetFloat($"{DeviceName}_Y_MIN");
}
if (PlayerPrefs.GetFloat($"{DeviceName}_DeadZone") != 0)
{
dead_zone = PlayerPrefs.GetFloat($"{DeviceName}_DeadZone");
}
if (PlayerPrefs.GetFloat($"{DeviceName}_TriggerValue") != 0)
{
trigger_value = PlayerPrefs.GetFloat($"{DeviceName}_TriggerValue");
}
if (PlayerPrefs.GetFloat($"{DeviceName}_GrabValue") != 0)
{
grab_value = PlayerPrefs.GetFloat($"{DeviceName}_GrabValue");
}
if (PlayerPrefs.GetFloat($"{DeviceName}_TrackpadValue") != 0)
{
trackpad_value = PlayerPrefs.GetFloat($"{DeviceName}_TrackpadValue");
}
AR1_linear_AA = new("com.example.ar1_linear1.AR1_linear_AA");
AR1_linear_AD = new("com.example.ar1_linear1.AR1_linear_AD");
AR1_linear_AE = new("com.example.ar1_linear1.AR1_linear_AE");
AR1_linear_AG = new("com.example.ar1_linear1.AR1_linear_AG");
}
public enum HandType
{
Left,
Right
}
public enum Axis
{
x = -3,
y = -2,
z = -1,
x_n,
y_n,
z_n
}
public enum CalibrationType
{
AdductFin = -2,
FistFin = -1,
None, //未标定
Fist, //握拳
Adduct, //并拢
Stretch, //张开
Completed //完成
}
private float f4, f5, f6, f7, f8, f9, f10, f11, f12, f13, f14, f15, f16, f17, f18;
private float a4 = 0,
a5 = 0,
a6 = 0,
a7 = 0,
a8 = 0,
a9 = 0,
a10 = 0,
a11,
a12 = 0,
a13 = 0,
a14 = 0,
a15;
private float n1 = 0,
n2 = 0,
n3 = 0,
n4 = 0,
n5 = 0,
n6 = 0,
n7 = 0,
n8 = 0,
n9 = 0,
n10 = 0,
n11 = 0,
n12 = 0,
n13 = 0,
n14 = 0,
n15 = 0;
private float h4 = 0,
h5 = 0,
h6 = 0,
h7 = 0,
h8 = 0,
h9 = 0,
h10 = 0,
h11 = 0,
h12 = 0,
h13 = 0,
h14 = 0,
h15 = 0,
h16 = 0,
h17 = 0;
private float m4 = 0,
m5 = 0,
m6 = 0,
m7 = 0,
m8 = 0,
m9 = 0,
m10 = 0,
m11 = 0,
m12 = 0,
m13 = 0,
m14 = 0,
m15 = 0;
private float dot4 = 0,
dot5 = 0,
dot6 = 0,
dot7 = 0,
dot8 = 0,
dot9 = 0,
dot10 = 0,
dot11 = 0,
dot12 = 0,
dot13 = 0,
dot14 = 0,
dot15 = 0;
private Queue<float> f4Queue = new Queue<float>();
private Queue<float> f5Queue = new Queue<float>();
private Queue<float> f6Queue = new Queue<float>();
private Queue<float> f7Queue = new Queue<float>();
private Queue<float> f8Queue = new Queue<float>();
private Queue<float> f9Queue = new Queue<float>();
private Queue<float> f10Queue = new Queue<float>();
private Queue<float> f11Queue = new Queue<float>();
private Queue<float> f12Queue = new Queue<float>();
private Queue<float> f13Queue = new Queue<float>();
private Queue<float> f14Queue = new Queue<float>();
private Queue<float> f15Queue = new Queue<float>();
private const int QUEUE_MAX_SIZE = 10;
public int HandDeviceIndex = 1;
public HandType Hand;
public Transform Wrist;
[Header("坐标系偏差")]
public Axis Pitch = Axis.z;
public Axis Roll = Axis.x_n;
public Axis Yaw = Axis.y_n;
[Header("IMU开关")] public bool HasIMU = false;
[Header("拇指根节点系数")][Range(0, 1)] public float coefficient = 0.6f;
[Header("拇指根节点偏差")] public Vector3 Thumb1Offset;
public string DeviceName;
public float time;
string line;
private CalibrationType mCalibrationType = CalibrationType.None;
private double[] pre_sensor_data;
private List<double> angle_data = new();
private List<double> raw_data = new();
bool isCalibration = false;
private float x_center_data = 1850;
private float y_center_data = 1850;
private float x_max_data = 3750;
private float x_min_data = 620;
private float y_min_data = 620;
private float y_max_data = 3750;
private bool centerCalib = false;
private bool rangeCalib = false;
private float dead_zone = 0.15f;
private float trackpad_value = 0.3f;
private float trigger_value = 0.5f;
private float grab_value = 0.5f;
private InputData input;
private bool SaveCalibrationDataPermission = false;
private bool ReadControllerSavedData = true;
private int _curCalibTimes = 0;
public void Method_update()
{
if (time < 0)
{
time = 5;
}
else
{
time -= Time.deltaTime;
}
line = UDE_API.GetDeviceDataByName(DeviceName);
if (string.IsNullOrEmpty(line))
{
return;
}
//Debug.Log("Line " + line);
var data = line.Split(',');
raw_data = new();
foreach (string str in data)
{
raw_data.Add(Convert.ToDouble(str));
}
f4 = Convert.ToSingle(data[0]);
f5 = Convert.ToSingle(data[1]);
f6 = Convert.ToSingle(data[2]);
f7 = Convert.ToSingle(data[3]);
f8 = Convert.ToSingle(data[4]);
f9 = Convert.ToSingle(data[5]);
f10 = Convert.ToSingle(data[6]);
f11 = Convert.ToSingle(data[7]);
f12 = Convert.ToSingle(data[8]);
f13 = Convert.ToSingle(data[9]);
f14 = Convert.ToSingle(data[10]);
f15 = Convert.ToSingle(data[11]);
if (data.Length > 12 && data.Length <= 16)
{
f16 = Convert.ToSingle(data[12]);
f17 = Convert.ToSingle(data[13]);
f18 = Convert.ToSingle(data[14]);
}
else if (data.Length > 16)
{
f16 = Convert.ToSingle(data[16]);
f17 = Convert.ToSingle(data[17]);
f18 = Convert.ToSingle(data[18]);
}
if (ReadControllerSavedData)
{
ReadControllerSavedData = false;
var x_temp = PlayerPrefs.GetFloat(DeviceName + "_X_Center");
if (x_temp != 0)
{
x_center_data = x_temp;
y_center_data = PlayerPrefs.GetFloat(DeviceName + "_Y_Center");
}
var max_temp = PlayerPrefs.GetFloat(DeviceName + "_X_Max");
if (max_temp != 0)
{
x_max_data = max_temp;
x_min_data = PlayerPrefs.GetFloat(DeviceName + "_X_Min");
y_max_data = PlayerPrefs.GetFloat(DeviceName + "_Y_Max");
y_min_data = PlayerPrefs.GetFloat(DeviceName + "_Y_Min");
}
}
float f25 = (f16 - x_center_data) / ((x_max_data - x_min_data) / 2);
float f26 = (f17 - y_center_data) / ((y_max_data - y_min_data) / 2);
if (f25 > 1)
{
f25 = 1;
}
if (f25 < -1)
{
f25 = -1;
}
if (f26 > 1)
{
f26 = 1;
}
if (f26 < -1)
{
f26 = -1;
}
if (f25 <= dead_zone && f25 >= -dead_zone)
{
f25 = 0;
}
if (f26 <= dead_zone && f26 >= -dead_zone)
{
f26 = 0;
}
input = new InputData();
input.joyX = f25;
input.joyY = f26;
switch (f18)
{
case 1:
input.bButton = true;
break;
case 2:
input.aButton = true;
break;
case 3:
input.menu = true;
break;
case 4:
input.joyButton = true;
break;
case 5:
break;
case 6:
break;
case 7:
break;
}
if (centerCalib)
{
x_center_data = f16;
y_center_data = f17;
centerCalib = false;
PlayerPrefs.SetFloat(DeviceName + "_X_Center", f16);
PlayerPrefs.SetFloat(DeviceName + "_Y_Center", f17);
}
if (rangeCalib)
{
if (f16 > 600)
{
x_min_data = Math.Min(x_min_data, f16);
}
if (f16 < 3800)
{
x_max_data = Math.Max(x_max_data, f16);
}
if (f17 > 600)
{
y_min_data = Math.Min(y_min_data, f17);
}
if (f17 < 3800)
{
y_max_data = Math.Max(y_max_data, f17);
}
}
if (mCalibrationType == CalibrationType.None && PlayerPrefs.GetInt(DeviceName) == 1)
{
string[] CalibSavedData = PlayerPrefs.GetString(DeviceName + "_CalibDT").Split(",");
int index = 0;
n4 = float.Parse(CalibSavedData[index++]);
n5 = float.Parse(CalibSavedData[index++]);
n6 = float.Parse(CalibSavedData[index++]);
n7 = float.Parse(CalibSavedData[index++]);
n8 = float.Parse(CalibSavedData[index++]);
n9 = float.Parse(CalibSavedData[index++]);
n10 = float.Parse(CalibSavedData[index++]);
n11 = float.Parse(CalibSavedData[index++]);
n12 = float.Parse(CalibSavedData[index++]);
n13 = float.Parse(CalibSavedData[index++]);
n14 = float.Parse(CalibSavedData[index++]);
n15 = float.Parse(CalibSavedData[index++]);
h4 = float.Parse(CalibSavedData[index++]);
h5 = float.Parse(CalibSavedData[index++]);
h6 = float.Parse(CalibSavedData[index++]);
h7 = float.Parse(CalibSavedData[index++]);
h8 = float.Parse(CalibSavedData[index++]);
h9 = float.Parse(CalibSavedData[index++]);
h10 = float.Parse(CalibSavedData[index++]);
h11 = float.Parse(CalibSavedData[index++]);
h12 = float.Parse(CalibSavedData[index++]);
h13 = float.Parse(CalibSavedData[index++]);
h14 = float.Parse(CalibSavedData[index++]);
h15 = float.Parse(CalibSavedData[index]);
mCalibrationType = CalibrationType.Completed;
}
#region Dynamic Calibration
//if (_curCalibTimes < 1000)
//{
// if (m4 < f4)
// {
// m4 = f4;
// if (m4 < h4)
// {
// m4 = h4;
// }
// }
// if (m5 < f5)
// {
// m5 = f5;
// if (m5 < h5)
// {
// m5 = h5;
// }
// }
// if (m6 < f6)
// {
// m6 = f6;
// if (m6 < h6)
// {
// m6 = h6;
// }
// }
// if (m7 < f7)
// {
// m7 = f7;
// if (m7 < h7)
// {
// m7 = h7;
// }
// }
// if (m9 < f9)
// {
// m9 = f9;
// if (m9 < h9)
// {
// m9 = h9;
// }
// }
// if (m10 < f10)
// {
// m10 = f10;
// if (m10 < h10)
// {
// m10 = h10;
// }
// }
// if (m12 < f12)
// {
// m12 = f12;
// if (m12 < h12)
// {
// m12 = h12;
// }
// }
// if (m13 < f13)
// {
// m13 = f13;
// if (m13 < h13)
// {
// m13 = h13;
// }
// }
// if (m15 < f15)
// {
// m15 = f15;
// if (m15 < h15)
// {
// m15 = h15;
// }
// }
// _curCalibTimes++;
//}
//else
//{
// //Debug.LogError("动态标定完成");
// //Debug.LogError($"{_deviceName}:{m4},{m5},{m6},{m7},{m8},{m9},{m10},{m11},{m12},{m13},{m14},{m15}");
// // f4处理
// if (m4 < f4)
// {
// UpdateQueue(f4Queue, f4);
// if (f4Queue.Count == QUEUE_MAX_SIZE && CalculateVariance(f4Queue) < 10)
// {
// dot4 = f4 - m4;
// m4 = f4;
// n4 += dot4;
// h4 += dot4;
// }
// }
// // f5处理
// if (m5 < f5)
// {
// UpdateQueue(f5Queue, f5);
// if (f5Queue.Count == QUEUE_MAX_SIZE && CalculateVariance(f5Queue) < 10)
// {
// dot5 = f5 - m5;
// m5 = f5;
// n5 += dot5;
// h5 += dot5;
// }
// }
// // f6处理
// if (m6 < f6)
// {
// UpdateQueue(f6Queue, f6);
// if (f6Queue.Count == QUEUE_MAX_SIZE && CalculateVariance(f6Queue) < 10)
// {
// dot6 = f6 - m6;
// m6 = f6;
// n6 += dot6;
// h6 += dot6;
// }
// }
// // f7处理
// if (m7 < f7)
// {
// UpdateQueue(f7Queue, f7);
// if (f7Queue.Count == QUEUE_MAX_SIZE && CalculateVariance(f7Queue) < 10)
// {
// dot7 = f7 - m7;
// m7 = f7;
// n7 += dot7;
// h7 += dot7;
// }
// }
// // f9处理
// if (m9 < f9)
// {
// UpdateQueue(f9Queue, f9);
// if (f9Queue.Count == QUEUE_MAX_SIZE && CalculateVariance(f9Queue) < 10)
// {
// dot9 = f9 - m9;
// m9 = f9;
// n9 += dot9;
// h9 += dot9;
// }
// }
// // f10处理
// if (m10 < f10)
// {
// UpdateQueue(f10Queue, f10);
// if (f10Queue.Count == QUEUE_MAX_SIZE && CalculateVariance(f10Queue) < 10)
// {
// dot10 = f10 - m10;
// m10 = f10;
// n10 += dot10;
// h10 += dot10;
// }
// }
// // f12处理
// if (m12 < f12)
// {
// UpdateQueue(f12Queue, f12);
// if (f12Queue.Count == QUEUE_MAX_SIZE && CalculateVariance(f12Queue) < 10)
// {
// dot12 = f12 - m12;
// m12 = f12;
// n12 += dot12;
// h12 += dot12;
// }
// }
// // f13处理
// if (m13 < f13)
// {
// UpdateQueue(f13Queue, f13);
// if (f13Queue.Count == QUEUE_MAX_SIZE && CalculateVariance(f13Queue) < 10)
// {
// dot13 = f13 - m13;
// m13 = f13;
// n13 += dot13;
// h13 += dot13;
// }
// }
// // f15处理
// if (m15 < f15)
// {
// UpdateQueue(f15Queue, f15);
// if (f15Queue.Count == QUEUE_MAX_SIZE && CalculateVariance(f15Queue) < 10)
// {
// dot15 = f15 - m15;
// m15 = f15;
// n15 += dot15;
// h15 += dot15;
// }
// }
//}
#endregion
if (mCalibrationType == CalibrationType.Completed)
{
if (SaveCalibrationDataPermission)
{
//标定记录单次标定后仅记录一次
SaveCalibrationDataPermission = false;
PlayerPrefs.SetInt(DeviceName, 1);
string DataSet = n4 + "," + n5 + "," + n6 + "," + n7 + "," + n8 + "," + n9 + "," + n10 + "," + n11 + "," + n12 + "," + n13 + "," + n14 + "," + n15 + ",";
DataSet += h4 + "," + h5 + "," + h6 + "," + h7 + "," + h8 + "," + h9 + "," + h10 + "," + h11 + "," + h12 + "," + h13 + "," + h14 + "," + h15;
PlayerPrefs.SetString(DeviceName + "_CalibDT", DataSet);
//Debug.Log("已记录新标定数据");
}
double[] org_f = new double[12] { f4, f5, f6, f7, f8, f9, f10, f11, f12, f13, f14, f15 };
double[] org_n = new double[12] { n4, n5, n6, n7, n8, n9, n10, n11, n12, n13, n14, n15 };
double[] org_h = new double[12] { h4, h5, h6, h7, h8, h9, h10, h11, h12, h13, h14, h15 };
float nn = 100;
double[] org_a = Auto_Cali.AutoCali(org_f, org_n, org_h, nn);
a4 = Convert.ToSingle(org_a[0]);
a5 = Convert.ToSingle(org_a[1]);
a6 = Convert.ToSingle(org_a[2]);
a7 = Convert.ToSingle(org_a[3]);
a8 = Convert.ToSingle(org_a[4]);
a9 = Convert.ToSingle(org_a[5]);
a10 = Convert.ToSingle(org_a[6]);
a11 = Convert.ToSingle(org_a[7]);
a12 = Convert.ToSingle(org_a[8]);
a13 = Convert.ToSingle(org_a[9]);
a14 = Convert.ToSingle(org_a[10]);
a15 = Convert.ToSingle(org_a[11]);
double[][] Y = new double[12][];
for (int i = 0; i < 12; i++)
{
Y[i] = new double[1];
}
Y[0][0] = Convert.ToDouble(a4);
Y[1][0] = Convert.ToDouble(a5);
Y[2][0] = Convert.ToDouble(a6);
Y[3][0] = Convert.ToDouble(a7);
Y[4][0] = Convert.ToDouble(a8);
Y[5][0] = Convert.ToDouble(a9);
Y[6][0] = Convert.ToDouble(a10);
Y[7][0] = Convert.ToDouble(a11);
Y[8][0] = Convert.ToDouble(a12);
Y[9][0] = Convert.ToDouble(a13);
Y[10][0] = Convert.ToDouble(a14);
Y[11][0] = Convert.ToDouble(a15);
double[] b = new double[12];
b[0] = Convert.ToDouble(a4);
b[1] = Convert.ToDouble(a5);
b[2] = Convert.ToDouble(a6);
b[3] = Convert.ToDouble(a7);
b[4] = Convert.ToDouble(a8);
b[5] = Convert.ToDouble(a9);
b[6] = Convert.ToDouble(a10);
b[7] = Convert.ToDouble(a11);
b[8] = Convert.ToDouble(a12);
b[9] = Convert.ToDouble(a13);
b[10] = Convert.ToDouble(a14);
b[11] = Convert.ToDouble(a15);
if (pre_sensor_data == null)
{
pre_sensor_data = new double[12];
pre_sensor_data[0] = Convert.ToDouble(a4);
pre_sensor_data[1] = Convert.ToDouble(a5);
pre_sensor_data[2] = Convert.ToDouble(a6);
pre_sensor_data[3] = Convert.ToDouble(a7);
pre_sensor_data[4] = Convert.ToDouble(a8);
pre_sensor_data[5] = Convert.ToDouble(a9);
pre_sensor_data[6] = Convert.ToDouble(a10);
pre_sensor_data[7] = Convert.ToDouble(a11);
pre_sensor_data[8] = Convert.ToDouble(a12);
pre_sensor_data[9] = Convert.ToDouble(a13);
pre_sensor_data[10] = Convert.ToDouble(a14);
pre_sensor_data[11] = Convert.ToDouble(a15);
return;
}
double[] result = new double[26];
if (string.IsNullOrEmpty(DeviceName))
{
result = AR1_linear_AE.CallStatic<double[]>("Senser2Angle", b, pre_sensor_data);
Version = AR1_linear_AE.GetStatic<string>("Version");
}
else if (DeviceName[5] == 'A')
{
result = AR1_linear_AA.CallStatic<double[]>("Senser2Angle", b, pre_sensor_data);
Version = AR1_linear_AA.GetStatic<string>("Version");
}
else if (DeviceName[5] == 'B')
{
result = AR1_linear_AD.CallStatic<double[]>("Senser2Angle", b, pre_sensor_data);
Version = AR1_linear_AD.GetStatic<string>("Version");
}
else if (DeviceName[5] == 'C' || DeviceName[5] == 'D')
{
result = AR1_linear_AE.CallStatic<double[]>("Senser2Angle", b, pre_sensor_data);
Version = AR1_linear_AE.GetStatic<string>("Version");
}
else if (DeviceName[5] == 'E' || DeviceName[5] == 'F')
{
result = AR1_linear_AG.CallStatic<double[]>("Senser2Angle", b, pre_sensor_data);
Version = AR1_linear_AG.GetStatic<string>("Version");
}
if (DeviceName.Contains('L'))
{
string str = string.Empty;
for (int i = 0; i < result.Length; i++)
{
str += result[i] + ",";
}
Debug.LogError("Left Res: " + str);
}
Array.Copy(b, pre_sensor_data, pre_sensor_data.Length);
angle_data = new List<double>(result);
//Debug.Log("Debug " + angle_data.ToArray().ToString());
if (Math.Abs(result[5]) >= trigger_value * 100)
{
input.trgButton = true;
input.trgValue = (float)((Math.Abs(result[5]) - trigger_value * 100) / 65);
}
if (Math.Abs(result[9]) >= grab_value * 100 && Math.Abs(result[13]) >= grab_value * 100)
input.grab = true;
if (Math.Abs(result[0]) >= trackpad_value * 60)
{
input.trackpad_touch = true;
}
}
}
private float CalculateVariance(Queue<float> queue)
{
if (queue.Count == 0) return 0;
float mean = queue.Average();
return queue.Sum(x => (x - mean) * (x - mean)) / queue.Count;
}
void UpdateQueue(Queue<float> queue, float value)
{
if (queue.Count >= QUEUE_MAX_SIZE)
{
queue.Dequeue();
}
queue.Enqueue(value);
}
public bool StartCalibration(CalibrationType calibrationType)
{
if (isCalibration)
{
return false;
}
isCalibration = true;
mCalibrationType = calibrationType;
return true;
}
public bool StopCalibration(CalibrationType calibrationType)
{
//line = UDE_API.GetDeviceDataByName(DeviceName);
if (string.IsNullOrEmpty(line))
{
return false;
}
if (!isCalibration)
{
return false;
}
//Debug.Log(line);
//var data = line.Split(',');
//f4 = Convert.ToSingle(data[0]);
//f5 = Convert.ToSingle(data[1]);
//f6 = Convert.ToSingle(data[2]);
//f7 = Convert.ToSingle(data[3]);
//f8 = Convert.ToSingle(data[4]);
//f9 = Convert.ToSingle(data[5]);
//f10 = Convert.ToSingle(data[6]);
//f11 = Convert.ToSingle(data[7]);
//f12 = Convert.ToSingle(data[8]);
//f13 = Convert.ToSingle(data[9]);
//f14 = Convert.ToSingle(data[10]);
//f15 = Convert.ToSingle(data[11]);
//if (data.Length > 12 && data.Length <= 16)
//{
// f16 = Convert.ToSingle(data[12]);
// f17 = Convert.ToSingle(data[13]);
// f18 = Convert.ToSingle(data[14]);
//}
//else if (data.Length > 16)
//{
// f16 = Convert.ToSingle(data[16]);
// f17 = Convert.ToSingle(data[17]);
// f18 = Convert.ToSingle(data[18]);
//}
switch (calibrationType)
{
case CalibrationType.Fist:
h4 = f4;
h5 = f5;
h6 = f6;
h7 = f7;
h9 = f9;
h10 = f10;
h12 = f12;
h13 = f13;
h15 = f15;
isCalibration = false;
mCalibrationType = CalibrationType.FistFin;
SaveCalibrationDataPermission = true;
break;
case CalibrationType.Adduct:
n4 = f4;
n5 = f5;
n6 = f6;
n7 = f7;
n8 = f8;
n9 = f9;
n10 = f10;
n11 = f11;
n12 = f12;
n13 = f13;
n14 = f14;
n15 = f15;
isCalibration = false;
mCalibrationType = CalibrationType.AdductFin;
break;
case CalibrationType.Stretch:
h8 = f8;
h11 = f11;
h14 = f14;
isCalibration = false;
mCalibrationType = CalibrationType.Completed;
break;
}
return true;
}
public CalibrationType GetCalibrationType()
{
return mCalibrationType;
}
public List<double> GetAngleData()
{
return angle_data;
}
public List<double> GetRawData()
{
return raw_data;
}
public void CalibrationCenterData()
{
centerCalib = true;
ReadControllerSavedData = true;
}
public void StartCalibrationRangeData()
{
rangeCalib = true;
}
public void StopCalibrationRangeData()
{
PlayerPrefs.SetFloat($"{DeviceName}_X_MAX", x_max_data);
PlayerPrefs.SetFloat($"{DeviceName}_X_MIN", x_min_data);
PlayerPrefs.SetFloat($"{DeviceName}_Y_MAX", y_max_data);
PlayerPrefs.SetFloat($"{DeviceName}_Y_MIN", y_min_data);
ReadControllerSavedData = true;
rangeCalib = false;
}
public InputData GetInputData()
{
return input;
}
public void SetDeadZone(float dead_zone)
{
this.dead_zone = dead_zone;
PlayerPrefs.SetFloat($"{DeviceName}_DeadZone", dead_zone);
}
public float GetDeadZone()
{
return dead_zone;
}
public void SetTriggerValue(float trigger_value)
{
this.trigger_value = trigger_value;
PlayerPrefs.SetFloat($"{DeviceName}_TriggerValue", trigger_value);
}
public float GetTriggerValue()
{
return trigger_value;
}
public void SetGrabValue(float grab_value)
{
this.grab_value = grab_value;
PlayerPrefs.SetFloat($"{DeviceName}_GrabValue", grab_value);
}
public float GetGrabValue()
{
return grab_value;
}
public void SetTrackpadValue(float trackpad_value)
{
this.trackpad_value = trackpad_value;
PlayerPrefs.SetFloat($"{DeviceName}_TrackpadValue", trackpad_value);
}
public float GetTrackpadValue()
{
return trackpad_value;
}
public double[] GetCalibrationInfoOffset()
{
double[] calibration_info = new double[12];
double[] org_n = new double[12] { n4, n5, n6, n7, n8, n9, n10, n11, n12, n13, n14, n15 };
double[] org_h = new double[12] { h4, h5, h6, h7, h8, h9, h10, h11, h12, h13, h14, h15 };
for (int i = 0; i < 12; i++)
{
calibration_info[i] = Mathf.Abs((float)(org_n[i] - org_h[i]));
}
return calibration_info;
}
public string GetAlgorithmVerName()
{
return Version;
}
}

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 3a8b325d93d9ba94ebba4418ec987a5f
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {fileID: 2800000, guid: 0b09374c5d8c3464e9f29b2e29f8982c, type: 3}
userData:
assetBundleName:
assetBundleVariant:

@ -0,0 +1,68 @@
using System.Collections;
using System.Collections.Generic;
using Unity.VisualScripting;
using UnityEngine;
public class DeviceManager : MonoBehaviour
{
// Start is called before the first frame update
void Start()
{
devices = new List<string>();
UDE_API.UDE_Init();
UDE_API.StartEnumDevices();
}
private float time = 3;
private List<string> devices;
// Update is called once per frame
void Update()
{
if (time < 0)
{
if (devices.Count < 2)
{
devices = UDE_API.GetDeviceList();
return;
}
UDE_API.StopEnumDevices();
//if (string.IsNullOrEmpty(Com_L.DeviceName))
//{
// if (devices[0].Contains("L"))
// {
// Com_L.DeviceName = devices[0];
// }
// else
// {
// Com_L.DeviceName = devices[1];
// }
// time = 3;
// return;
//}
//if (string.IsNullOrEmpty(Com_R.DeviceName))
//{
// if (devices[0].Contains("R"))
// {
// Com_R.DeviceName = devices[0];
// }
// else
// {
// Com_R.DeviceName = devices[1];
// }
// time = 4;
//}
}
if (time > 3)
{
return;
}
time -= Time.deltaTime;
}
}

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: d987bb43fcb068146b8f14e085d1e897
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {fileID: 2800000, guid: 0b09374c5d8c3464e9f29b2e29f8982c, type: 3}
userData:
assetBundleName:
assetBundleVariant:

@ -0,0 +1,11 @@
public class Mcu2PcProto
{
public byte DeviceID = Pc2McuProto.DeviceID.MCU;
public byte Address = Pc2McuProto.HumanAddress.LeftArm;
public byte CommandType = Pc2McuProto.CommandType.ADC_IMU_16;
public byte DataType = Pc2McuProto.DataType.AngleAndAbduceData;
public byte DataLength = 60;
public short[] AngleDatas = null;
public short[] AbduceDatas = null;
public byte crc = 0;
}

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: f2e05399a8566a848b8f0037a00258b3
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {fileID: 2800000, guid: 0b09374c5d8c3464e9f29b2e29f8982c, type: 3}
userData:
assetBundleName:
assetBundleVariant:

@ -0,0 +1,86 @@
using System;
[Serializable]
public static class Pc2McuProto
{
public struct DeviceID
{
public const byte PC = 0xA0;
public const byte MCU = 0x0A;
}
public struct HumanAddress
{
public const byte LeftPalm = 0x01;//左手手掌
public const byte RightPalm = 0x02;//右手手掌
public const byte LeftArm = 0x03;//左手手臂
public const byte RightArm = 0x04;//右手手臂
public const byte LeftShoulder = 0x05;//左手肩膀
public const byte RightShoulder = 0x06;//右手肩膀
public const byte LeftChest = 0x07;//左边胸部
public const byte RightChest = 0x08;//右边胸部
//...
public const byte OtherAddress = 0xFF;//其他地址
}
public struct CommandType
{
public const byte ADC_IMU_16 = 0x01;
public const byte CalibrationState1 = 0x02;
public const byte CalibrationState2 = 0x03;
public const byte SHAKE_CONTROLLER_COMMAND = 0x04;
public const byte BATTERY_VOLTAGE_DATA = 0x05;
public const byte CalibrationState5 = 0x06;
public const byte LINK_STATUS = 0x07;
public const byte CalibrationState7 = 0x08;
public const byte CalibrationState8 = 0x09;
public const byte CalibrationState9 = 0x0A;
//...
public const byte StateTransStop = 0xC8;
public const byte DebugAngle1 = 0xC9;
public const byte DebugAngle2 = 0xCA;
public const byte DebugAngle3 = 0xCB;
public const byte DebugAngle4 = 0xCC;
public const byte DebugAngle5 = 0xCD;
public const byte DebugAngle6 = 0xCE;
public const byte DebugAngle7 = 0xCF;
public const byte DebugAngle8 = 0xD0;
public const byte DebugAngle9 = 0xD1;
public const byte DebugAngle10 = 0xD2;
public const byte DebugAngle11 = 0xD3;
public const byte DebugAngle12 = 0xD4;
public const byte DebugAbduce1 = 0xD5;
public const byte DebugAbduce2 = 0xD6;
public const byte DebugAbduce3 = 0xD7;
public const byte HeartBeat = 0x68;
public const byte StopDataReceive = 0xA0;//停止接收数据
}
public struct DataType
{
public const byte AngleAndAbduceData = 0x01;//幅度角+倾角数据
public const byte AngleData = 0x02;//幅度角数据
public const byte IMUData = 0x03;//IMU数据
public const byte AbduceData = 0x04;//倾角数据
public const byte AccelerationData = 0x05;//加速度数据
public const byte GyroData = 0x06;//陀螺仪数据
public const byte OffsetData = 0x07;//位移数据
//...
public const byte AllData = 0xC8;//幅度数据+倾角数据+重力速度(全数据主要用于调试)
//...
public const byte OtherData = 0xFF;//其他数据
}
public static byte check_num(byte[] buffer, int size)
{
byte cr = 0;
for (int i = 2; i < size - 1; i++)
{
cr += buffer[i];
}
return cr;
}
}

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 2445ac89ff59a4c448d425be3ec80086
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {fileID: 2800000, guid: 0b09374c5d8c3464e9f29b2e29f8982c, type: 3}
userData:
assetBundleName:
assetBundleVariant:

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save