This commit is contained in:
CroakFang
2022-09-10 18:13:03 +08:00
parent 307064b8fd
commit 2f8abc4b00
4 changed files with 20 additions and 10 deletions
+2 -1
View File
@@ -12030,7 +12030,7 @@ MonoBehaviour:
m_HandleRect: {fileID: 1882365342} m_HandleRect: {fileID: 1882365342}
m_Direction: 2 m_Direction: 2
m_Value: 1 m_Value: 1
m_Size: 0.5800894 m_Size: 0.58008933
m_NumberOfSteps: 0 m_NumberOfSteps: 0
m_OnValueChanged: m_OnValueChanged:
m_PersistentCalls: m_PersistentCalls:
@@ -15204,6 +15204,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 94327bb2c8a0f0a418a2eb8912da68d3, type: 3} m_Script: {fileID: 11500000, guid: 94327bb2c8a0f0a418a2eb8912da68d3, type: 3}
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
canvasScaler: {fileID: 0}
CharactersList: {fileID: 1558324558} CharactersList: {fileID: 1558324558}
CostumeList: {fileID: 270183827} CostumeList: {fileID: 270183827}
AnimationSetList: {fileID: 92965282} AnimationSetList: {fileID: 92965282}
+15 -5
View File
@@ -344,6 +344,8 @@ public class UmaViewerBuilder : MonoBehaviour
public void LoadLive(int id) public void LoadLive(int id)
{ {
var asset = UmaViewerMain.Instance.AbList.FirstOrDefault(a => a.Name.EndsWith("cutt_son" + id)); var asset = UmaViewerMain.Instance.AbList.FirstOrDefault(a => a.Name.EndsWith("cutt_son" + id));
if (asset == null) return;
if (CurrentLiveContainer != null) if (CurrentLiveContainer != null)
{ {
Destroy(CurrentLiveContainer.gameObject); Destroy(CurrentLiveContainer.gameObject);
@@ -503,15 +505,23 @@ public class UmaViewerBuilder : MonoBehaviour
TextAsset asset = bundle.LoadAsset<TextAsset>(Path.GetFileNameWithoutExtension(lyricsVar)); TextAsset asset = bundle.LoadAsset<TextAsset>(Path.GetFileNameWithoutExtension(lyricsVar));
string[] lines = asset.text.Split("\n"[0]); string[] lines = asset.text.Split("\n"[0]);
for (int i = 1; i < lines.Length; i++) for (int i = 1; i < lines.Length; i++)
{ {
string[] words = lines[i].Split(','); string[] words = lines[i].Split(',');
UmaLyricsData lyricsData = new UmaLyricsData() if (words.Length > 0)
{ {
time = float.Parse(words[0])/1000, try
text = words[1].Replace("[COMMA]",",") {
}; UmaLyricsData lyricsData = new UmaLyricsData()
CurrentLyrics.Add(lyricsData); {
time = float.Parse(words[0]) / 1000,
text = (words.Length > 1) ? words[1].Replace("[COMMA]", ",") : ""
};
CurrentLyrics.Add(lyricsData);
}
catch{}
}
} }
} }
} }
+2 -3
View File
@@ -70,7 +70,6 @@ public class UmaViewerUI : MonoBehaviour,FaceLoadCallBack
public void HighlightChildImage(Transform mainObject, Image child) public void HighlightChildImage(Transform mainObject, Image child)
{ {
//Debug.Log("Looking for " + child.name + " in " + mainObject.name);
foreach(var t in mainObject.GetComponentsInChildren<Image>()) foreach(var t in mainObject.GetComponentsInChildren<Image>())
{ {
if (t.transform.parent != mainObject) continue; if (t.transform.parent != mainObject) continue;
@@ -165,9 +164,9 @@ public class UmaViewerUI : MonoBehaviour,FaceLoadCallBack
var CharaContainer = Instantiate(UmaContainerNoTMPPrefab, LiveSoundList.content).GetComponent<UmaUIContainer>(); var CharaContainer = Instantiate(UmaContainerNoTMPPrefab, LiveSoundList.content).GetComponent<UmaUIContainer>();
CharaContainer.GetComponentInChildren<Text>().text = " " + live.MusicId + " " + live.songName; CharaContainer.GetComponentInChildren<Text>().text = " " + live.MusicId + " " + live.songName;
var CharaimageInstance1 = container.GetComponent<Image>(); var CharaimageInstance1 = CharaContainer.GetComponent<Image>();
CharaContainer.Button.onClick.AddListener(() => { CharaContainer.Button.onClick.AddListener(() => {
HighlightChildImage(LiveList.content, imageInstance1); HighlightChildImage(LiveSoundList.content, CharaimageInstance1);
ListLiveSounds(live.MusicId); ListLiveSounds(live.MusicId);
}); });
} }
+1 -1
View File
@@ -82,7 +82,7 @@ PlayerSettings:
androidFullscreenMode: 1 androidFullscreenMode: 1
defaultIsNativeResolution: 1 defaultIsNativeResolution: 1
macRetinaSupport: 1 macRetinaSupport: 1
runInBackground: 0 runInBackground: 1
captureSingleScreen: 0 captureSingleScreen: 0
muteOtherAudioSources: 0 muteOtherAudioSources: 0
Prepare IOS For Recording: 0 Prepare IOS For Recording: 0