Browse Source

subtitle update

main
cailean 9 months ago
parent
commit
37674424a6
  1. 32
      Assets/8_Scripts/1_Managers/SubtitleManager.cs
  2. 2
      Assets/ML-Agents/Timers/DreconDemo_timers.json

32
Assets/8_Scripts/1_Managers/SubtitleManager.cs

@ -67,7 +67,6 @@ public class SubtitleManager : MonoBehaviour
offset = Random.Range(5f, 7f);
}
Debug.Log($"offset{offset}, wt{waitTime}");
float earlyOffset = 0;
if (!earlyStop)
@ -90,21 +89,24 @@ public class SubtitleManager : MonoBehaviour
bool earlyStop = false;
if (Random.Range(0f, 10f) > 6) earlyStop = true;
yield return new WaitForSecondsRealtime(0);
foreach (char c in sentence.ToCharArray())
{
index++;
m_Text.text += c;
float randomInterval = Random.Range(0.001f, 0.002f);
yield return new WaitForSecondsRealtime(randomInterval);
m_TimeElapsed += randomInterval;
// Stop audio early based on probability
if (randomStoppingValue == index && earlyStop)
{
//AudioManager.instance.StopSound(m_NarrationSFXInst);
}
}
m_Text.text = sentence;
//foreach (char c in sentence.ToCharArray())
//{
// index++;
// m_Text.text += c;
// float randomInterval = Random.Range(0, 0f);
// yield return new WaitForSecondsRealtime(randomInterval);
// m_TimeElapsed += randomInterval;
// // Stop audio early based on probability
// if (randomStoppingValue == index && earlyStop)
// {
// //AudioManager.instance.StopSound(m_NarrationSFXInst);
// }
//}
StartCoroutine(ClearText(waitTime, false));
}

2
Assets/ML-Agents/Timers/DreconDemo_timers.json

@ -1 +1 @@
{"count":1,"self":14.925488,"total":15.3567591,"children":{"InitializeActuators":{"count":1,"self":0.0010115,"total":0.0010115,"children":null},"InitializeSensors":{"count":1,"self":0.0010003,"total":0.0010003,"children":null},"AgentSendState":{"count":769,"self":0.0040076999999999995,"total":0.0987039,"children":{"CollectObservations":{"count":385,"self":0.08215829999999999,"total":0.08215829999999999,"children":null},"WriteActionMask":{"count":385,"self":0.0009993,"total":0.0009993,"children":null},"RequestDecision":{"count":385,"self":0.0115386,"total":0.0115386,"children":null}}},"DecideAction":{"count":769,"self":0.2014501,"total":0.2014501,"children":null},"AgentAct":{"count":769,"self":0.1291049,"total":0.1291049,"children":null}},"gauges":{"DReCon-v0.CumulativeReward":{"count":1,"max":58.17516,"min":58.17516,"runningAverage":58.17516,"value":58.17516,"weightedAverage":58.17516}},"metadata":{"timer_format_version":"0.1.0","start_time_seconds":"1712237404","unity_version":"2022.3.5f1","command_line_arguments":"C:\\Program Files\\Unity\\Hub\\Editor\\2022.3.5f1\\Editor\\Unity.exe -projectpath C:\\Users\\caile\\Desktop\\Projects\\24_3-Moloch\\2_Unity\\Expeirments\\Drecon2022 -useHub -hubIPC -cloudEnvironment production -licensingIpc LicenseClient-caile -hubSessionId f88630f1-920b-4dbe-b665-558da63c889d -accessToken j9cV6YRoUof5axDzFeIFUEeVZBbcpurLrJC0wa7ct1A005f","communication_protocol_version":"1.5.0","com.unity.ml-agents_version":"2.0.1","scene_name":"DreconDemo","end_time_seconds":"1712237419"}}
{"count":1,"self":11.190443199999999,"total":11.464506,"children":{"InitializeActuators":{"count":1,"self":0.000509,"total":0.000509,"children":null},"InitializeSensors":{"count":1,"self":0.0015046,"total":0.0015046,"children":null},"AgentSendState":{"count":458,"self":0.0005938,"total":0.059389899999999995,"children":{"CollectObservations":{"count":229,"self":0.048258699999999995,"total":0.048258699999999995,"children":null},"WriteActionMask":{"count":229,"self":0,"total":0,"children":null},"RequestDecision":{"count":229,"self":0.010537399999999999,"total":0.010537399999999999,"children":null}}},"DecideAction":{"count":458,"self":0.1365659,"total":0.1365659,"children":null},"AgentAct":{"count":458,"self":0.0760933,"total":0.0760933,"children":null}},"gauges":{},"metadata":{"timer_format_version":"0.1.0","start_time_seconds":"1712239133","unity_version":"2022.3.5f1","command_line_arguments":"C:\\Program Files\\Unity\\Hub\\Editor\\2022.3.5f1\\Editor\\Unity.exe -projectpath C:\\Users\\caile\\Desktop\\Projects\\24_3-Moloch\\2_Unity\\Expeirments\\Drecon2022 -useHub -hubIPC -cloudEnvironment production -licensingIpc LicenseClient-caile -hubSessionId f88630f1-920b-4dbe-b665-558da63c889d -accessToken j9cV6YRoUof5axDzFeIFUEeVZBbcpurLrJC0wa7ct1A005f","communication_protocol_version":"1.5.0","com.unity.ml-agents_version":"2.0.1","scene_name":"DreconDemo","end_time_seconds":"1712239145"}}
Loading…
Cancel
Save