static AssetMoveResult OnWillMoveAsset(string fromPath, string toPath, string[] newPaths, string[] NewMetaPaths) { AssetMoveResult finalResult = AssetMoveResult.DidNotMove; if (!InternalEditorUtility.HasTeamLicense()) { return(finalResult); } finalResult = AssetModificationHook.OnWillMoveAsset(fromPath, toPath); foreach (var assetModificationProcessorClass in AssetModificationProcessors) { MethodInfo method = assetModificationProcessorClass.GetMethod("OnWillMoveAsset", BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Static); if (method != null) { RequireTeamLicense(); object[] args = { fromPath, toPath }; if (!CheckArgumentsAndReturnType(args, method, finalResult.GetType())) { continue; } finalResult |= (AssetMoveResult)method.Invoke(null, args); } } return(finalResult); }
static AssetMoveResult OnWillMoveAsset(string fromPath, string toPath, string[] newPaths, string[] NewMetaPaths) { AssetMoveResult finalResult = AssetMoveResult.DidNotMove; finalResult = AssetModificationHook.OnWillMoveAsset(fromPath, toPath); foreach (var assetModificationProcessorClass in AssetModificationProcessors) { const string methodName = "OnWillMoveAsset"; MethodInfo method = assetModificationProcessorClass.GetMethod(methodName, BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Static); if (method != null) { object[] args = { fromPath, toPath }; if (!CheckArgumentsAndReturnType(args, method, finalResult.GetType())) { continue; } using (new EditorPerformanceMarker($"{assetModificationProcessorClass.Name}.{methodName}", assetModificationProcessorClass).Auto()) finalResult |= (AssetMoveResult)method.Invoke(null, args); } } return(finalResult); }
private static AssetMoveResult OnWillMoveAsset(string fromPath, string toPath, string[] newPaths, string[] NewMetaPaths) { AssetMoveResult didNotMove = AssetMoveResult.DidNotMove; if (InternalEditorUtility.HasTeamLicense()) { didNotMove = AssetModificationHook.OnWillMoveAsset(fromPath, toPath); IEnumerator <Type> enumerator = AssetModificationProcessors.GetEnumerator(); try { while (enumerator.MoveNext()) { MethodInfo method = enumerator.Current.GetMethod("OnWillMoveAsset", BindingFlags.NonPublic | BindingFlags.Public | BindingFlags.Static); if (method != null) { RequireTeamLicense(); object[] args = new object[] { fromPath, toPath }; if (CheckArgumentsAndReturnType(args, method, didNotMove.GetType())) { didNotMove |= (int)method.Invoke(null, args); } } } } finally { if (enumerator == null) { } enumerator.Dispose(); } } return(didNotMove); }
private static AssetMoveResult OnWillMoveAsset(string fromPath, string toPath, string[] newPaths, string[] NewMetaPaths) { AssetMoveResult didNotMove = AssetMoveResult.DidNotMove; if (InternalEditorUtility.HasTeamLicense()) { didNotMove = AssetModificationHook.OnWillMoveAsset(fromPath, toPath); foreach (System.Type type in AssetModificationProcessors) { MethodInfo method = type.GetMethod("OnWillMoveAsset", BindingFlags.NonPublic | BindingFlags.Public | BindingFlags.Static); if (method != null) { RequireTeamLicense(); object[] args = new object[] { fromPath, toPath }; if (CheckArgumentsAndReturnType(args, method, didNotMove.GetType())) { didNotMove |= (AssetMoveResult)method.Invoke(null, args); } } } } return(didNotMove); }
private static AssetMoveResult OnWillMoveAsset(string fromPath, string toPath, string[] newPaths, string[] NewMetaPaths) { AssetMoveResult assetMoveResult = AssetMoveResult.DidNotMove; if (!InternalEditorUtility.HasTeamLicense()) { return(assetMoveResult); } assetMoveResult = AssetModificationHook.OnWillMoveAsset(fromPath, toPath); foreach (Type current in AssetModificationProcessorInternal.AssetModificationProcessors) { MethodInfo method = current.GetMethod("OnWillMoveAsset", BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic); if (method != null) { AssetModificationProcessorInternal.RequireTeamLicense(); object[] array = new object[] { fromPath, toPath }; if (AssetModificationProcessorInternal.CheckArgumentsAndReturnType(array, method, assetMoveResult.GetType())) { assetMoveResult |= (AssetMoveResult)((int)method.Invoke(null, array)); } } } return(assetMoveResult); }
private static AssetMoveResult OnWillMoveAsset(string fromPath, string toPath, string[] newPaths, string[] NewMetaPaths) { AssetMoveResult assetMoveResult1 = AssetMoveResult.DidNotMove; if (!InternalEditorUtility.HasTeamLicense()) { return(assetMoveResult1); } AssetMoveResult assetMoveResult2 = AssetModificationHook.OnWillMoveAsset(fromPath, toPath); foreach (System.Type modificationProcessor in AssetModificationProcessorInternal.AssetModificationProcessors) { MethodInfo method = modificationProcessor.GetMethod("OnWillMoveAsset", BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic); if (method != null) { AssetModificationProcessorInternal.RequireTeamLicense(); object[] objArray = new object[2] { (object)fromPath, (object)toPath }; if (AssetModificationProcessorInternal.CheckArgumentsAndReturnType(objArray, method, assetMoveResult2.GetType())) { assetMoveResult2 |= (AssetMoveResult)method.Invoke((object)null, objArray); } } } return(assetMoveResult2); }