UnityEditor.AssetModificationProcessorInternal.CheckArgumentsAndReturnType C# (CSharp) Method

CheckArgumentsAndReturnType() private static method

private static CheckArgumentsAndReturnType ( object args, MethodInfo method, Type returnType ) : bool
args object
method System.Reflection.MethodInfo
returnType System.Type
return bool
        private static bool CheckArgumentsAndReturnType(object[] args, MethodInfo method, Type returnType)
        {
            Type[] types = new Type[args.Length];
            for (int i = 0; i < args.Length; i++)
            {
                types[i] = args[i].GetType();
            }
            return CheckArgumentTypesAndReturnType(types, method, returnType);
        }

Usage Example

Beispiel #1
0
        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);
        }
All Usage Examples Of UnityEditor.AssetModificationProcessorInternal::CheckArgumentsAndReturnType