River Jiang
2020-10-27 1f5eda1c9d22a3676298751c7282a5874f13bed0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#if UNITY_EDITOR
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEditor;
 
namespace MoreMountains.NiceVibrations
{
    /// <summary>
    /// An asset post processor used to compensate for a new bug introduced by Unity in 2019.3.12f1
    /// </summary>
    public class MMNVAssetPostProcessor : AssetPostprocessor
    {
        /// <summary>
        /// On GeneratedCSProject, we force ReferenceOutputAssembly to true to avoid missing references in VS.
        /// </summary>
        /// <param name="path"></param>
        /// <param name="content"></param>
        /// <returns></returns>
        private static string OnGeneratedCSProject(string path, string content)
        {
            return content.Replace("<ReferenceOutputAssembly>false</ReferenceOutputAssembly>", "<ReferenceOutputAssembly>true</ReferenceOutputAssembly>");
        }
    } 
}
#endif