コード例 #1
0
 public void UEOpenFile(string filePath, bool openNew = true)
 {
     if (File.Exists(filePath))
     {
         string fileFullPath = Path.GetFullPath(filePath);
         PlayerPrefs.SetString(Constants.CURRENT_FILE_KEY, Utility.PathNormalized(fileFullPath));
         string js = string.Format(@"window.loadCodeFile({0});", openNew ? "true" : "false");
         ExecuteJavascript(js);
         FileWatcher.AddToLastOpen(filePath);
     }
 }
コード例 #2
0
        /// <summary>
        /// Open file in code editor at specfic line
        /// </summary>
        /// <param name="filePath"></param>
        /// <param name="line"></param>
        public void UEOpenFile(string filePath, int line)
        {
            string fileFullPath = Path.GetFullPath(filePath);

            if (File.Exists(fileFullPath))
            {
                string js = string.Format(@"window.openAtLine('{0}', {1})", Utility.PathNormalized(fileFullPath), line);
                ExecuteJavascript(js);
                FileWatcher.AddToLastOpen(fileFullPath);
            }
        }