EnableBoolSoundbankSettingInWproj() public static méthode

public static EnableBoolSoundbankSettingInWproj ( string SettingName, string WwiseProjectPath ) : bool
SettingName string
WwiseProjectPath string
Résultat bool
Exemple #1
0
    // Modify the .wproj file to set needed soundbank settings
    private static bool SetSoundbankSettings()
    {
        if (string.IsNullOrEmpty(Settings.WwiseProjectPath))
        {
            // Nothing to do here, because setup should succees if Wwise project is not given
            return(true);
        }

        Regex  r             = new Regex("_WwiseIntegrationTemp.*?([/\\\\])");
        string SoundbankPath = AkUtilities.GetFullPath(r.Replace(Application.streamingAssetsPath, "$1"), Settings.SoundbankPath);
        string WprojPath     = AkUtilities.GetFullPath(Application.dataPath, Settings.WwiseProjectPath);

#if UNITY_EDITOR_OSX
        SoundbankPath = "Z:" + SoundbankPath;
#endif

        if (AkUtilities.EnableBoolSoundbankSettingInWproj("SoundBankGenerateHeaderFile", WprojPath))
        {
            if (AkUtilities.SetSoundbankHeaderFilePath(WprojPath, SoundbankPath))
            {
                return(AkUtilities.EnableBoolSoundbankSettingInWproj("SoundBankGenerateMaxAttenuationInfo", WprojPath));
            }
        }
        return(false);
    }
    // Modify the .wproj file to set needed soundbank settings
    private static bool SetSoundbankSettings()
    {
        if (string.IsNullOrEmpty(Settings.WwiseProjectPath))
        {
            return(true);
        }

        var r             = new System.Text.RegularExpressions.Regex("_WwiseIntegrationTemp.*?([/\\\\])");
        var SoundbankPath = AkUtilities.GetFullPath(r.Replace(UnityEngine.Application.streamingAssetsPath, "$1"),
                                                    Settings.SoundbankPath);
        var WprojPath = AkUtilities.GetFullPath(UnityEngine.Application.dataPath, Settings.WwiseProjectPath);

#if UNITY_EDITOR_OSX
        SoundbankPath = "Z:" + SoundbankPath;
#endif

        SoundbankPath = AkUtilities.MakeRelativePath(System.IO.Path.GetDirectoryName(WprojPath), SoundbankPath);
        if (AkUtilities.EnableBoolSoundbankSettingInWproj("SoundBankGenerateHeaderFile", WprojPath))
        {
            if (AkUtilities.SetSoundbankHeaderFilePath(WprojPath, SoundbankPath))
            {
                return(AkUtilities.EnableBoolSoundbankSettingInWproj("SoundBankGenerateMaxAttenuationInfo", WprojPath));
            }
        }

        return(false);
    }
        public static void SetupSoundbankSetting()
        {
            AkUtilities.EnableBoolSoundbankSettingInWproj("SoundBankGenerateEstimatedDuration", AkWwiseEditorSettings.WwiseProjectAbsolutePath);

            UnityEditor.EditorApplication.update  += RunOnce;
            AkWwiseXMLWatcher.Instance.XMLUpdated += UpdateAllClips;
        }
        public static void SetupSoundbankSetting()
        {
            var WprojPath = AkUtilities.GetFullPath(UnityEngine.Application.dataPath, WwiseSettings.LoadSettings().WwiseProjectPath);

            AkUtilities.EnableBoolSoundbankSettingInWproj("SoundBankGenerateEstimatedDuration", WprojPath);

            UnityEditor.EditorApplication.update  += RunOnce;
            AkWwiseXMLWatcher.Instance.XMLUpdated += UpdateAllClips;
        }
    public override Playable CreateTrackMixer(PlayableGraph graph, GameObject go, int inputCount)
    {
#if UNITY_EDITOR
        WwiseSettings Settings  = WwiseSettings.LoadSettings();
        string        WprojPath = AkUtilities.GetFullPath(Application.dataPath, Settings.WwiseProjectPath);
        AkUtilities.EnableBoolSoundbankSettingInWproj("SoundBankGenerateEstimatedDuration", WprojPath);
#endif
        var playable = ScriptPlayable <AkEventPlayableBehavior> .Create(graph);

        playable.SetInputCount(inputCount);
        setFadeTimes();
        setOwnerClips();
        return(playable);
    }
Exemple #6
0
    public override UnityEngine.Playables.Playable CreateTrackMixer(UnityEngine.Playables.PlayableGraph graph,
                                                                    UnityEngine.GameObject go, int inputCount)
    {
#if UNITY_EDITOR
        var Settings  = WwiseSettings.LoadSettings();
        var WprojPath = AkUtilities.GetFullPath(UnityEngine.Application.dataPath, Settings.WwiseProjectPath);
        AkUtilities.EnableBoolSoundbankSettingInWproj("SoundBankGenerateEstimatedDuration", WprojPath);
#endif
        var playable = UnityEngine.Playables.ScriptPlayable <AkEventPlayableBehavior> .Create(graph);

        UnityEngine.Playables.PlayableExtensions.SetInputCount(playable, inputCount);
        setFadeTimes();
        setOwnerClips();
        return(playable);
    }