移除perforce代码

main
刘涛 2023-10-23 16:54:35 +08:00
parent ff0698aba2
commit c42f39359d
17 changed files with 65 additions and 65 deletions

View File

@ -22,7 +22,7 @@ public static class HotUpadeEditorHelper
[MenuItem("Tools/热更新/转移热更dll")] [MenuItem("Tools/热更新/转移热更dll")]
public static void CopyHotUpdateDll() public static void CopyHotUpdateDll()
{ {
VersionControlSystem.Checkout(HOT_UPDATE_DLLS_DIR); // VersionControlSystem.Checkout(HOT_UPDATE_DLLS_DIR);
var assemblies = SettingsUtil.HotUpdateAssemblyNamesExcludePreserved; var assemblies = SettingsUtil.HotUpdateAssemblyNamesExcludePreserved;
var dir = new DirectoryInfo(Application.dataPath + HOT_UPDATE_DLL_PATH + EditorUserBuildSettings.activeBuildTarget); var dir = new DirectoryInfo(Application.dataPath + HOT_UPDATE_DLL_PATH + EditorUserBuildSettings.activeBuildTarget);
var files = dir.GetFiles(); var files = dir.GetFiles();
@ -44,7 +44,7 @@ public static class HotUpadeEditorHelper
[MenuItem("Tools/热更新/转移补充元数据dll")] [MenuItem("Tools/热更新/转移补充元数据dll")]
public static void CopyMetaDataDll() public static void CopyMetaDataDll()
{ {
VersionControlSystem.Checkout(HOT_UPDATE_DLLS_DIR); // VersionControlSystem.Checkout(HOT_UPDATE_DLLS_DIR);
List<string> assemblies = GetMetaDataDllList(); List<string> assemblies = GetMetaDataDllList();
var dir = new DirectoryInfo(Application.dataPath + META_DATA_DLL_PATH + EditorUserBuildSettings.activeBuildTarget); var dir = new DirectoryInfo(Application.dataPath + META_DATA_DLL_PATH + EditorUserBuildSettings.activeBuildTarget);
var files = dir.GetFiles(); var files = dir.GetFiles();

View File

@ -40,7 +40,7 @@ public class LTCompressor
return; return;
} }
// 检出 // 检出
VersionControlSystem.Checkout(assetPath); // VersionControlSystem.Checkout(assetPath);
_CompressAnim(loadController); _CompressAnim(loadController);
} }

View File

@ -338,7 +338,7 @@ class BuildLauncher
bool ignoreHotUpdate, bool ignoreHotUpdate,
bool needClearCached = false) bool needClearCached = false)
{ {
VersionControlSystem.GetLast(); // VersionControlSystem.GetLast();
SetEnableHotUpdate(!ignoreHotUpdate); SetEnableHotUpdate(!ignoreHotUpdate);
var contentBuildSucceeded = BuildAddressables(buildTarget, profileName, version, workSpace, ignoreHotUpdate, needClearCached); var contentBuildSucceeded = BuildAddressables(buildTarget, profileName, version, workSpace, ignoreHotUpdate, needClearCached);

View File

@ -111,7 +111,7 @@ public class BuildWindow : OdinEditorWindow
needClearCache); needClearCache);
} }
VersionControlSystem.Revert("Assets/AddressableAssetsData/AssetGroups"); // VersionControlSystem.Revert("Assets/AddressableAssetsData/AssetGroups");
} }
[PropertySpace(50)] [PropertySpace(50)]

View File

@ -102,7 +102,7 @@ public class LevelEditorWindow : OdinEditorWindow
{ {
CheckCorrectLevel(); CheckCorrectLevel();
var configFilePath = string.Format(Constants.LEVEL_CONFIG_FORMAT_PATH, currentLevelData.id); var configFilePath = string.Format(Constants.LEVEL_CONFIG_FORMAT_PATH, currentLevelData.id);
VersionControlSystem.Checkout(configFilePath); // VersionControlSystem.Checkout(configFilePath);
JsonHelper.SaveJson(configFilePath, currentLevelData); JsonHelper.SaveJson(configFilePath, currentLevelData);
UpdateLevelList(currentLevelData); UpdateLevelList(currentLevelData);
CustomPopUpWindow.PopUp($"保存关卡数据成功:{configFilePath}"); CustomPopUpWindow.PopUp($"保存关卡数据成功:{configFilePath}");
@ -212,7 +212,7 @@ public class LevelEditorWindow : OdinEditorWindow
private void SaveLevelList() private void SaveLevelList()
{ {
var configFilePath = string.Format(Constants.LEVEL_LIST_PATH); var configFilePath = string.Format(Constants.LEVEL_LIST_PATH);
VersionControlSystem.Checkout(configFilePath); // VersionControlSystem.Checkout(configFilePath);
JsonHelper.SaveJson(configFilePath, LevelList); JsonHelper.SaveJson(configFilePath, LevelList);
} }

View File

@ -93,10 +93,10 @@ public class MapEditorUtils
prefabFilePath, InteractionMode.UserAction); prefabFilePath, InteractionMode.UserAction);
var configFilePath = string.Format(Constants.MAP_CONFIG_FORMAT_PATH, map.GetMapFileName()); var configFilePath = string.Format(Constants.MAP_CONFIG_FORMAT_PATH, map.GetMapFileName());
if (File.Exists(configFilePath)) // if (File.Exists(configFilePath))
{ // {
VersionControlSystem.Checkout(configFilePath); // VersionControlSystem.Checkout(configFilePath);
} // }
Framework.JsonHelper.SaveJson(configFilePath, map.MapData); Framework.JsonHelper.SaveJson(configFilePath, map.MapData);
if (File.Exists(prefabFilePath) && File.Exists(configFilePath)) if (File.Exists(prefabFilePath) && File.Exists(configFilePath))

View File

@ -752,7 +752,7 @@ namespace MapEditor
private void SaveMapList() private void SaveMapList()
{ {
var configFilePath = string.Format(Constants.MAP_CONFIG_FORMAT_PATH, "MapList"); var configFilePath = string.Format(Constants.MAP_CONFIG_FORMAT_PATH, "MapList");
VersionControlSystem.Checkout(configFilePath); // VersionControlSystem.Checkout(configFilePath);
JsonHelper.SaveJson(configFilePath, MapList); JsonHelper.SaveJson(configFilePath, MapList);
} }

View File

@ -21,7 +21,7 @@ namespace MapEditor
[Button("保存")] [Button("保存")]
private void Save() private void Save()
{ {
VersionControlSystem.Checkout(Constants.TERRAIN_TYPE_CONFIG_PATH); // VersionControlSystem.Checkout(Constants.TERRAIN_TYPE_CONFIG_PATH);
TerrainTypeConfig.Save(terrainTypeProperties); TerrainTypeConfig.Save(terrainTypeProperties);
CustomPopUpWindow.PopUp($"保存地块属性成功"); CustomPopUpWindow.PopUp($"保存地块属性成功");
} }

View File

@ -17,7 +17,7 @@ public class AnimOverrideHandle
// 先进行checkout // 先进行checkout
var path = AssetDatabase.GetAssetPath(asset); var path = AssetDatabase.GetAssetPath(asset);
VersionControlSystem.Checkout(path); // VersionControlSystem.Checkout(path);
// 再进行设置 // 再进行设置
// 找到工程内所有clips // 找到工程内所有clips
@ -91,8 +91,8 @@ public class AnimOverrideHandle
} }
// 先进行checkout // 先进行checkout
var path = AssetDatabase.GetAssetPath(asset); // var path = AssetDatabase.GetAssetPath(asset);
VersionControlSystem.Checkout(path); // VersionControlSystem.Checkout(path);
// 再进行设置 // 再进行设置
// 找到工程内所有clips // 找到工程内所有clips

View File

@ -18,7 +18,7 @@ namespace SkillEditor
{ {
Directory.CreateDirectory(saveFolderPath); Directory.CreateDirectory(saveFolderPath);
} }
VersionControlSystem.Checkout(saveFolderPath); // VersionControlSystem.Checkout(saveFolderPath);
// 通过配置表读取所有角色 // 通过配置表读取所有角色
var characterList = EditorTableManager.instance.tables.CharacterAttri.DataList; var characterList = EditorTableManager.instance.tables.CharacterAttri.DataList;

View File

@ -64,7 +64,7 @@ namespace SkillEditor
private bool _CheckModelImportSetting(string fbxPath) private bool _CheckModelImportSetting(string fbxPath)
{ {
// 先checkout资源 // 先checkout资源
VersionControlSystem.Checkout(fbxPath); // VersionControlSystem.Checkout(fbxPath);
// 获取import // 获取import
var importer = AssetImporter.GetAtPath(fbxPath) as ModelImporter; var importer = AssetImporter.GetAtPath(fbxPath) as ModelImporter;

View File

@ -25,7 +25,7 @@ namespace Gameplay.Story.Cmp.Utils
private static void _Process(string fbxPath, List<int> startFrames, List<int> loopFrames, List<int> endFrames) private static void _Process(string fbxPath, List<int> startFrames, List<int> loopFrames, List<int> endFrames)
{ {
VersionControlSystem.Checkout(fbxPath); // VersionControlSystem.Checkout(fbxPath);
var impoter = AssetImporter.GetAtPath(fbxPath) as ModelImporter; var impoter = AssetImporter.GetAtPath(fbxPath) as ModelImporter;
if (impoter == null) if (impoter == null)
{ {

View File

@ -57,7 +57,7 @@ namespace Gameplay.Story.Cmp.Utils
if (System.IO.File.Exists(fullPath)) if (System.IO.File.Exists(fullPath))
{ {
// 先进行checkout // 先进行checkout
VersionControlSystem.Checkout(savePath); // VersionControlSystem.Checkout(savePath);
AssetDatabase.DeleteAsset(savePath); AssetDatabase.DeleteAsset(savePath);
AssetDatabase.Refresh(); AssetDatabase.Refresh();

View File

@ -37,8 +37,8 @@ public static class ConfigTools
EditorUtility.DisplayProgressBar("配置工具", "正在导出配置到【Client】", 0); EditorUtility.DisplayProgressBar("配置工具", "正在导出配置到【Client】", 0);
try try
{ {
VersionControlSystem.Checkout(Application.dataPath + "/Code/Scripts/Gameplay/DataTable"); // VersionControlSystem.Checkout(Application.dataPath + "/Code/Scripts/Gameplay/DataTable");
VersionControlSystem.Checkout(Application.dataPath + "/Config/Data"); // VersionControlSystem.Checkout(Application.dataPath + "/Config/Data");
#if UNITY_EDITOR_WIN #if UNITY_EDITOR_WIN
var dirInfo = new DirectoryInfo(CONFIG_DIR); var dirInfo = new DirectoryInfo(CONFIG_DIR);
EditorUtil.StartProcess(dirInfo.FullName + CMD_PARAM, Application.dataPath, CONFIG_DIR); EditorUtil.StartProcess(dirInfo.FullName + CMD_PARAM, Application.dataPath, CONFIG_DIR);

View File

@ -1,38 +1,38 @@
using System.Collections; // using System.Collections;
using System.Collections.Generic; // using System.Collections.Generic;
using UnityEngine; // using UnityEngine;
using UnityEditor; // using UnityEditor;
using UnityEditor.VersionControl; // using UnityEditor.VersionControl;
//
public class AutoSetPerforce // public class AutoSetPerforce
{ // {
//
private static string[] needCheckOutPath = { // private static string[] needCheckOutPath = {
"Assets/Code/Scripts/Gameplay/DataTable", // "Assets/Code/Scripts/Gameplay/DataTable",
"Assets/Config/Data", // "Assets/Config/Data",
}; // };
//
[MenuItem("Tools/AutoCheckOut")] // [MenuItem("Tools/AutoCheckOut")]
public static void AutoCheckOut() // public static void AutoCheckOut()
{ // {
_CheckPerforce(); // _CheckPerforce();
} // }
//
private static void _CheckPerforce() // private static void _CheckPerforce()
{ // {
// 检测文件 // // 检测文件
for (var i = 0; i < needCheckOutPath.Length; ++i) // for (var i = 0; i < needCheckOutPath.Length; ++i)
{ // {
var path = needCheckOutPath[i]; // var path = needCheckOutPath[i];
_CheckOutFile(path); // _CheckOutFile(path);
} // }
} // }
//
private static void _CheckOutFile(string path) // private static void _CheckOutFile(string path)
{ // {
if (VersionControlUtils.IsPathVersioned(path)) // if (VersionControlUtils.IsPathVersioned(path))
{ // {
Provider.Checkout(path, CheckoutMode.Both); // Provider.Checkout(path, CheckoutMode.Both);
} // }
} // }
} // }

View File

@ -33,7 +33,7 @@ public static class ProtoTools
string [] csProto = new string[] { "client.proto", "message_id.proto", "common.proto"}; string [] csProto = new string[] { "client.proto", "message_id.proto", "common.proto"};
VersionControlSystem.Checkout(outputDir); // VersionControlSystem.Checkout(outputDir);
for (int i = 0; i < csProto.Length; i ++) for (int i = 0; i < csProto.Length; i ++)
{ {
@ -231,7 +231,7 @@ public static class ProtoTools
string codePath = Application.dataPath + $"/Code/Scripts/Gameplay/Net/Messages/MSG_{msgID}.cs"; string codePath = Application.dataPath + $"/Code/Scripts/Gameplay/Net/Messages/MSG_{msgID}.cs";
if(!File.Exists(codePath)) if(!File.Exists(codePath))
{ {
VersionControlSystem.Checkout(Application.dataPath + "/Code/Scripts/Gameplay/Net/Messages"); // VersionControlSystem.Checkout(Application.dataPath + "/Code/Scripts/Gameplay/Net/Messages");
string content = TmpContent.Replace("_MSG_NAME_", msgID); string content = TmpContent.Replace("_MSG_NAME_", msgID);
DateTime currentDateTime = DateTime.Now; DateTime currentDateTime = DateTime.Now;
@ -258,7 +258,7 @@ public static class ProtoTools
string codeMessagePool = Application.dataPath + "/Code/Scripts/Gameplay/Net/Client/NetManager.cs"; string codeMessagePool = Application.dataPath + "/Code/Scripts/Gameplay/Net/Client/NetManager.cs";
VersionControlSystem.Checkout(codeMessagePool); // VersionControlSystem.Checkout(codeMessagePool);
EditorUtil.ReplaceContentByTag(codeMessagePool, "MESSAGE_START", "MESSAGE_END", messagePoolStr); EditorUtil.ReplaceContentByTag(codeMessagePool, "MESSAGE_START", "MESSAGE_END", messagePoolStr);
} }
} }

View File

@ -149,8 +149,8 @@ public class GetUIPath :Editor
//写入绑定文件 //写入绑定文件
if (File.Exists(dataFileName)) if (File.Exists(dataFileName))
{ {
var bindName = _genFilePath + _selectGo.name + "Binder.cs"; // var bindName = _genFilePath + _selectGo.name + "Binder.cs";
VersionControlSystem.Checkout(bindName); // VersionControlSystem.Checkout(bindName);
File.Delete(dataFileName); File.Delete(dataFileName);
} }