Unity电影纹理音频不同步

时间:2016-02-15 10:08:33

标签: unity3d

当我尝试在UNITY 5.1.2 RawImage上播放电影时。 它有效,但音频与电影不同步,我无法弄清楚原因。

以下是播放电影的代码:

If Value.IndexOf(MyNumberGroupSymbol) <> -1 And Value.IndexOf(MyDecimalSymbol) = -1 Then
                If Value.Length - (Value.IndexOf(MyNumberGroupSymbol) + 1) = 1 Or Value.Length - (Value.IndexOf(MyNumberGroupSymbol) + 1) = 2 Then
                    'The group separator has been used instead of the decimal separator so the correct decimal separator will be set
                    Value = Value.Replace(MyNumberGroupSymbol, MyDecimalSymbol)
                End If
            End If
            If Double.TryParse(Value, System.Globalization.NumberStyles.Number, Threading.Thread.CurrentThread.CurrentUICulture, 0) = True 
                If MyDecimalSymbol = "." Then
                    Dim MyDouble As Double = Double.Parse(Value, New System.Globalization.CultureInfo("en-GB"))
                    MyValue = MyDouble.ToString("N" & Decimals, New System.Globalization.CultureInfo("en-GB"))
                    'Decimals makes sure there are enough decimals after the decimal separator
                Else
                    Dim MyDouble As Double = Double.Parse(Value, New System.Globalization.CultureInfo("nl-NL"))
                    MyValue = MyDouble.ToString("N" & Decimals, New System.Globalization.CultureInfo("nl-NL"))
                End If
            End If

它附加到RawImage对象,并附加了RawImage脚本。我想在玩家按某个位置的按钮时播放电影。

由于

0 个答案:

没有答案