UnityEditor.AssetModificationProcessorInternal.GetIsOpenForEditMethods C# (CSharp) Méthode

GetIsOpenForEditMethods() static private méthode

static private GetIsOpenForEditMethods ( ) : System.Reflection.MethodInfo[]
Résultat System.Reflection.MethodInfo[]
        internal static MethodInfo[] GetIsOpenForEditMethods()
        {
            if (isOpenForEditMethods == null)
            {
                List<MethodInfo> list = new List<MethodInfo>();
                foreach (Type type in AssetModificationProcessors)
                {
                    MethodInfo method = type.GetMethod("IsOpenForEdit", BindingFlags.NonPublic | BindingFlags.Public | BindingFlags.Static);
                    if (method != null)
                    {
                        RequireTeamLicense();
                        string str = "";
                        bool flag = false;
                        Type[] types = new Type[] { str.GetType(), str.GetType().MakeByRefType() };
                        if (CheckArgumentTypesAndReturnType(types, method, flag.GetType()))
                        {
                            list.Add(method);
                        }
                    }
                }
                isOpenForEditMethods = list.ToArray();
            }
            return isOpenForEditMethods;
        }

Usage Example

Exemple #1
0
        internal static bool IsOpenForEdit(string assetPath, out string message)
        {
            message = string.Empty;
            if (string.IsNullOrEmpty(assetPath))
            {
                return(true);
            }
            bool result = AssetModificationHook.IsOpenForEdit(assetPath, out message);

            MethodInfo[] array = AssetModificationProcessorInternal.GetIsOpenForEditMethods();
            for (int i = 0; i < array.Length; i++)
            {
                MethodInfo methodInfo = array[i];
                object[]   array2     = new object[]
                {
                    assetPath,
                    message
                };
                if (!(bool)methodInfo.Invoke(null, array2))
                {
                    message = (array2[1] as string);
                    return(false);
                }
            }
            return(result);
        }
All Usage Examples Of UnityEditor.AssetModificationProcessorInternal::GetIsOpenForEditMethods