game logo (1)

This commit is contained in:
mangorifo
2024-02-16 16:21:09 +08:00
parent 159c74df2a
commit e2de50750c
9 changed files with 3182 additions and 537 deletions
-78
View File
@@ -713,45 +713,6 @@ AnimationClip:
classID: 114
script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
flags: 0
- serializedVersion: 2
curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 1
value: 58.5
inSlope: 0
outSlope: 0
tangentMode: 136
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 1.6666666
value: 107.59
inSlope: 0
outSlope: 0
tangentMode: 136
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 2.2666667
value: 107.59
inSlope: 0
outSlope: 0
tangentMode: 136
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_fontSize
path: LineArea/Name
classID: 114
script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3}
flags: 0
- serializedVersion: 2
curve:
serializedVersion: 2
@@ -1737,45 +1698,6 @@ AnimationClip:
classID: 114
script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
flags: 0
- serializedVersion: 2
curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 1
value: 58.5
inSlope: 0
outSlope: 0
tangentMode: 136
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 1.6666666
value: 107.59
inSlope: 0
outSlope: 0
tangentMode: 136
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 2.2666667
value: 107.59
inSlope: 0
outSlope: 0
tangentMode: 136
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_fontSize
path: LineArea/Name
classID: 114
script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3}
flags: 0
- serializedVersion: 2
curve:
serializedVersion: 2
File diff suppressed because one or more lines are too long
Binary file not shown.

After

Width:  |  Height:  |  Size: 10 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.9 MiB

File diff suppressed because it is too large Load Diff
@@ -0,0 +1,78 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using TMPro;
public class ListGameResolutions : MonoBehaviour
{
public TMP_Dropdown ResolutionDropdown;
private List<Resolution> FilteredResolutions;
//int DropdownResolutionValue;
private Resolution[] resolutions;
private float currentRefreshrate;
private int currentResolutionIndex = 0;
private int fl;
private int fw;
public static string ToAspectRatio(int width, int height)
{
int r;
int oa = width;
int ob = height;
while (height != 0)
{
r = width % height;
width = height;
height = r;
}
return (oa / width).ToString() + ":" + (ob / width).ToString();
}
void Start()
{
if (ResolutionDropdown)
{
resolutions = Screen.resolutions;
FilteredResolutions = new List<Resolution>();
ResolutionDropdown.ClearOptions();
currentRefreshrate = Screen.currentResolution.refreshRate;
for (int i = 0; i < resolutions.Length; i++)
{
if (resolutions[i].refreshRate == currentRefreshrate)
{
FilteredResolutions.Add(resolutions[i]);
}
}
List<string> options = new List<string>();
for (int i = 0; i < FilteredResolutions.Count; i++)
{
if (ToAspectRatio(FilteredResolutions[i].width, FilteredResolutions[i].height) == "16:9")
{
string ResolOption = FilteredResolutions[i].width + "x" + FilteredResolutions[i].height;
options.Add(ResolOption);
if (FilteredResolutions[i].width == Screen.width && FilteredResolutions[i].height == Screen.height)
{
currentResolutionIndex = i;
}
}
}
ResolutionDropdown.AddOptions(options);
ResolutionDropdown.value = currentResolutionIndex;
ResolutionDropdown.RefreshShownValue();
//}
}
}
public void SetWindowResolution(int ResolutionIndex)
{
Resolution resolution = FilteredResolutions[ResolutionIndex];
Screen.SetResolution(resolution.width, resolution.height, true);
fl = resolution.width;
fw = resolution.height;
PlayerPrefs.SetInt("ResolutionIndex", ResolutionIndex);
Debug.Log("Changed window resolution index in PlayerPrefs: " + PlayerPrefs.GetInt("ResolutionIndex"));
}
}
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long