GetVersion() 공개 메소드

Returns the version of the asset postprocessor.

public GetVersion ( ) : uint
리턴 uint
        private static uint[] GetAudioProcessorVersions()
        {
            List <uint> list = new List <uint>();

            foreach (Type current in EditorAssemblies.SubclassesOf(typeof(AssetPostprocessor)))
            {
                try
                {
                    AssetPostprocessor assetPostprocessor = Activator.CreateInstance(current) as AssetPostprocessor;
                    Type type    = assetPostprocessor.GetType();
                    bool flag    = type.GetMethod("OnPreprocessAudio", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic) != null;
                    bool flag2   = type.GetMethod("OnPostprocessAudio", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic) != null;
                    uint version = assetPostprocessor.GetVersion();
                    if (version != 0u && (flag || flag2))
                    {
                        list.Add(version);
                    }
                }
                catch (MissingMethodException)
                {
                    AssetPostprocessingInternal.LogPostProcessorMissingDefaultConstructor(current);
                }
                catch (Exception exception)
                {
                    Debug.LogException(exception);
                }
            }
            return(list.ToArray());
        }
        private static uint[] GetMeshProcessorVersions()
        {
            List <uint> uintList = new List <uint>();

            foreach (System.Type type1 in EditorAssemblies.SubclassesOf(typeof(AssetPostprocessor)))
            {
                try
                {
                    AssetPostprocessor instance = Activator.CreateInstance(type1) as AssetPostprocessor;
                    System.Type        type2    = instance.GetType();
                    bool flag1   = type2.GetMethod("OnPreprocessModel", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic) != null;
                    bool flag2   = type2.GetMethod("OnProcessMeshAssingModel", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic) != null;
                    bool flag3   = type2.GetMethod("OnPostprocessModel", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic) != null;
                    uint version = instance.GetVersion();
                    if ((int)version != 0)
                    {
                        if (!flag1 && !flag2)
                        {
                            if (!flag3)
                            {
                                continue;
                            }
                        }
                        uintList.Add(version);
                    }
                }
                catch (MissingMethodException ex)
                {
                    AssetPostprocessingInternal.LogPostProcessorMissingDefaultConstructor(type1);
                }
                catch (Exception ex)
                {
                    Debug.LogException(ex);
                }
            }
            return(uintList.ToArray());
        }