Hi, I'm trying to read the length (time) of an FsmObject variable which is an audioclip.
The audioclip doesn't exist in the project, it's generated by a 3rd-party text-to-speech, which I am loading directly into the FsmObject variable (in my custom action).
In the same action, I am trying to get the length of the generated audio.... I am struggling how to convert the FsmObject.Value into a Unity audioClip, so I can get audioClip.length
_audioClip = audioSpeech.Value;
length.Value = _audioClip.length;
my error: error CS0266: Cannot implicitly convert type 'UnityEngine.Object' to 'UnityEngine.AudioClip'. An explicit conversion exists (are you missing a cast?)
How do I convert?