示例#1
0
    private void Awake()
    {
#if UNITY_ANDROID
        m_UsePersistentPath = true;
#endif
        if (m_UsePersistentPath)
        {
            AppRootHelper.SetCustomBase(Path.Combine(Application.persistentDataPath, m_VisSubPath));
        }
        else
        {
            AppRootHelper.SetCustomBase(Path.GetFullPath(m_VisSubPath));
        }
        if (!Directory.Exists(AppRootHelper.AppRoot))
        {
            Directory.CreateDirectory(AppRootHelper.AppRoot);
        }
    }
示例#2
0
        private static void Main(string[] args)
        {
            if (args.Contains("--root"))
            {
                int i = args.ToList().IndexOf("--root");
                AppRootHelper.SetCustomBase(Path.GetFullPath(args[i + 1]));
                List <string> a = new List <string>(args);
                a.RemoveRange(i, 2);
                args = a.ToArray();
            }
            else
            {
                AppRootHelper.
                SetAppDomainBase();     // Hack to be able to use the .netstandard libs in unity AND as console app.
            }

            VisConsole.RunConsole(args);
        }