コード例 #1
0
        private static void PostprocessAudio(AudioClip tex, string pathName)
        {
            IEnumerator enumerator = AssetPostprocessingInternal.m_ImportProcessors.GetEnumerator();

            try
            {
                while (enumerator.MoveNext())
                {
                    AssetPostprocessor target = (AssetPostprocessor)enumerator.Current;
                    object[]           args   = new object[]
                    {
                        tex
                    };
                    AttributeHelper.InvokeMemberIfAvailable(target, "OnPostprocessAudio", args);
                }
            }
            finally
            {
                IDisposable disposable;
                if ((disposable = (enumerator as IDisposable)) != null)
                {
                    disposable.Dispose();
                }
            }
        }
コード例 #2
0
        private static void PostprocessGameObjectWithUserProperties(GameObject go, string[] prop_names, object[] prop_values)
        {
            IEnumerator enumerator = AssetPostprocessingInternal.m_ImportProcessors.GetEnumerator();

            try
            {
                while (enumerator.MoveNext())
                {
                    AssetPostprocessor target = (AssetPostprocessor)enumerator.Current;
                    object[]           args   = new object[]
                    {
                        go,
                        prop_names,
                        prop_values
                    };
                    AttributeHelper.InvokeMemberIfAvailable(target, "OnPostprocessGameObjectWithUserProperties", args);
                }
            }
            finally
            {
                IDisposable disposable;
                if ((disposable = (enumerator as IDisposable)) != null)
                {
                    disposable.Dispose();
                }
            }
        }
コード例 #3
0
        private static void PostprocessAnimation(GameObject root, AnimationClip clip)
        {
            IEnumerator enumerator = AssetPostprocessingInternal.m_ImportProcessors.GetEnumerator();

            try
            {
                while (enumerator.MoveNext())
                {
                    AssetPostprocessor target = (AssetPostprocessor)enumerator.Current;
                    object[]           args   = new object[]
                    {
                        root,
                        clip
                    };
                    AttributeHelper.InvokeMemberIfAvailable(target, "OnPostprocessAnimation", args);
                }
            }
            finally
            {
                IDisposable disposable;
                if ((disposable = (enumerator as IDisposable)) != null)
                {
                    disposable.Dispose();
                }
            }
        }
コード例 #4
0
        private static EditorCurveBinding[] PostprocessGameObjectWithAnimatedUserProperties(GameObject go, EditorCurveBinding[] bindings)
        {
            IEnumerator enumerator = AssetPostprocessingInternal.m_ImportProcessors.GetEnumerator();

            try
            {
                while (enumerator.MoveNext())
                {
                    AssetPostprocessor target = (AssetPostprocessor)enumerator.Current;
                    object[]           args   = new object[]
                    {
                        go,
                        bindings
                    };
                    AttributeHelper.InvokeMemberIfAvailable(target, "OnPostprocessGameObjectWithAnimatedUserProperties", args);
                }
            }
            finally
            {
                IDisposable disposable;
                if ((disposable = (enumerator as IDisposable)) != null)
                {
                    disposable.Dispose();
                }
            }
            return(bindings);
        }
コード例 #5
0
        private static Material ProcessMeshAssignMaterial(Renderer renderer, Material material)
        {
            IEnumerator enumerator = AssetPostprocessingInternal.m_ImportProcessors.GetEnumerator();
            Material    result;

            try
            {
                while (enumerator.MoveNext())
                {
                    AssetPostprocessor target = (AssetPostprocessor)enumerator.Current;
                    object[]           args   = new object[]
                    {
                        material,
                        renderer
                    };
                    object obj = AttributeHelper.InvokeMemberIfAvailable(target, "OnAssignMaterialModel", args);
                    if (obj as Material)
                    {
                        result = (obj as Material);
                        return(result);
                    }
                }
            }
            finally
            {
                IDisposable disposable;
                if ((disposable = (enumerator as IDisposable)) != null)
                {
                    disposable.Dispose();
                }
            }
            result = null;
            return(result);
        }
コード例 #6
0
 private static void PreprocessAudio(string pathName)
 {
     foreach (AssetPostprocessor target in AssetPostprocessingInternal.m_ImportProcessors)
     {
         AttributeHelper.InvokeMemberIfAvailable(target, "OnPreprocessAudio", null);
     }
 }
コード例 #7
0
 static void PreprocessAudio(string pathName)
 {
     foreach (AssetPostprocessor inst in m_ImportProcessors)
     {
         AttributeHelper.InvokeMemberIfAvailable(inst, "OnPreprocessAudio", null);
     }
 }
コード例 #8
0
 private static void PreprocessTexture(string pathName)
 {
     foreach (AssetPostprocessor importProcessor in AssetPostprocessingInternal.m_ImportProcessors)
     {
         AttributeHelper.InvokeMemberIfAvailable((object)importProcessor, "OnPreprocessTexture", (object[])null);
     }
 }
コード例 #9
0
 static void PostprocessMaterial(Material material)
 {
     foreach (AssetPostprocessor inst in m_ImportProcessors)
     {
         object[] args = { material };
         AttributeHelper.InvokeMemberIfAvailable(inst, "OnPostprocessMaterial", args);
     }
 }
コード例 #10
0
 static void PostprocessMeshHierarchy(GameObject root)
 {
     foreach (AssetPostprocessor inst in m_ImportProcessors)
     {
         object[] args = { root };
         AttributeHelper.InvokeMemberIfAvailable(inst, "OnPostprocessMeshHierarchy", args);
     }
 }
コード例 #11
0
 static void PostprocessSpeedTree(GameObject gameObject)
 {
     foreach (AssetPostprocessor inst in m_ImportProcessors)
     {
         object[] args = { gameObject };
         AttributeHelper.InvokeMemberIfAvailable(inst, "OnPostprocessSpeedTree", args);
     }
 }
コード例 #12
0
 static void PostprocessAnimation(GameObject root, AnimationClip clip)
 {
     foreach (AssetPostprocessor inst in m_ImportProcessors)
     {
         object[] args = { root, clip };
         AttributeHelper.InvokeMemberIfAvailable(inst, "OnPostprocessAnimation", args);
     }
 }
コード例 #13
0
 static void PostprocessGameObjectWithUserProperties(GameObject go, string[] prop_names, object[] prop_values)
 {
     foreach (AssetPostprocessor inst in m_ImportProcessors)
     {
         object[] args = { go, prop_names, prop_values };
         AttributeHelper.InvokeMemberIfAvailable(inst, "OnPostprocessGameObjectWithUserProperties", args);
     }
 }
コード例 #14
0
 static void PostprocessSprites(Texture2D tex, string pathName, Sprite[] sprites)
 {
     foreach (AssetPostprocessor inst in m_ImportProcessors)
     {
         object[] args = { tex, sprites };
         AttributeHelper.InvokeMemberIfAvailable(inst, "OnPostprocessSprites", args);
     }
 }
コード例 #15
0
 static void PostprocessAudio(AudioClip tex, string pathName)
 {
     foreach (AssetPostprocessor inst in m_ImportProcessors)
     {
         object[] args = { tex };
         AttributeHelper.InvokeMemberIfAvailable(inst, "OnPostprocessAudio", args);
     }
 }
コード例 #16
0
 static EditorCurveBinding[] PostprocessGameObjectWithAnimatedUserProperties(GameObject go, EditorCurveBinding[] bindings)
 {
     foreach (AssetPostprocessor inst in m_ImportProcessors)
     {
         object[] args = { go, bindings };
         AttributeHelper.InvokeMemberIfAvailable(inst, "OnPostprocessGameObjectWithAnimatedUserProperties", args);
     }
     return(bindings);
 }
コード例 #17
0
 private static void PostprocessAudio(AudioClip tex, string pathName)
 {
     foreach (AssetPostprocessor importProcessor in AssetPostprocessingInternal.m_ImportProcessors)
     {
         AttributeHelper.InvokeMemberIfAvailable((object)importProcessor, "OnPostprocessAudio", new object[1] {
             (object)tex
         });
     }
 }
コード例 #18
0
 private static void PostprocessSpeedTree(GameObject gameObject)
 {
     foreach (AssetPostprocessor importProcessor in AssetPostprocessingInternal.m_ImportProcessors)
     {
         AttributeHelper.InvokeMemberIfAvailable((object)importProcessor, "OnPostprocessSpeedTree", new object[1]
         {
             (object)gameObject
         });
     }
 }
コード例 #19
0
        static void PostprocessAssetbundleNameChanged(string assetPAth, string prevoiusAssetBundleName, string newAssetBundleName)
        {
            object[] args = { assetPAth, prevoiusAssetBundleName, newAssetBundleName };

            foreach (var assetPostprocessorClass in GetCachedAssetPostprocessorClasses())
            {
                var assetPostprocessor = Activator.CreateInstance(assetPostprocessorClass) as AssetPostprocessor;
                AttributeHelper.InvokeMemberIfAvailable(assetPostprocessor, "OnPostprocessAssetbundleNameChanged", args);
            }
        }
コード例 #20
0
 private static void PostprocessSpeedTree(GameObject gameObject)
 {
     foreach (AssetPostprocessor target in AssetPostprocessingInternal.m_ImportProcessors)
     {
         object[] args = new object[]
         {
             gameObject
         };
         AttributeHelper.InvokeMemberIfAvailable(target, "OnPostprocessSpeedTree", args);
     }
 }
コード例 #21
0
 private static void PostprocessSprites(Texture2D tex, string pathName, Sprite[] sprites)
 {
     foreach (AssetPostprocessor importProcessor in AssetPostprocessingInternal.m_ImportProcessors)
     {
         AttributeHelper.InvokeMemberIfAvailable((object)importProcessor, "OnPostprocessSprites", new object[2]
         {
             (object)tex,
             (object)sprites
         });
     }
 }
コード例 #22
0
 private static void PostprocessAudio(AudioClip tex, string pathName)
 {
     foreach (AssetPostprocessor target in AssetPostprocessingInternal.m_ImportProcessors)
     {
         object[] args = new object[]
         {
             tex
         };
         AttributeHelper.InvokeMemberIfAvailable(target, "OnPostprocessAudio", args);
     }
 }
コード例 #23
0
 private static void PostprocessGameObjectWithUserProperties(GameObject go, string[] prop_names, object[] prop_values)
 {
     foreach (AssetPostprocessor importProcessor in AssetPostprocessingInternal.m_ImportProcessors)
     {
         AttributeHelper.InvokeMemberIfAvailable((object)importProcessor, "OnPostprocessGameObjectWithUserProperties", new object[3]
         {
             (object)go,
             (object)prop_names,
             (object)prop_values
         });
     }
 }
コード例 #24
0
 private static void PostprocessSprites(Texture2D tex, string pathName, Sprite[] sprites)
 {
     foreach (AssetPostprocessor target in AssetPostprocessingInternal.m_ImportProcessors)
     {
         object[] args = new object[]
         {
             tex,
             sprites
         };
         AttributeHelper.InvokeMemberIfAvailable(target, "OnPostprocessSprites", args);
     }
 }
コード例 #25
0
 private static void PostprocessAssetbundleNameChanged(string assetPAth, string prevoiusAssetBundleName, string newAssetBundleName)
 {
     object[] args = new object[3]
     {
         (object)assetPAth,
         (object)prevoiusAssetBundleName,
         (object)newAssetBundleName
     };
     foreach (System.Type type in EditorAssemblies.SubclassesOf(typeof(AssetPostprocessor)))
     {
         AttributeHelper.InvokeMemberIfAvailable((object)(Activator.CreateInstance(type) as AssetPostprocessor), "OnPostprocessAssetbundleNameChanged", args);
     }
 }
コード例 #26
0
 private static void PostprocessGameObjectWithUserProperties(GameObject go, string[] prop_names, object[] prop_values)
 {
     foreach (AssetPostprocessor target in AssetPostprocessingInternal.m_ImportProcessors)
     {
         object[] args = new object[]
         {
             go,
             prop_names,
             prop_values
         };
         AttributeHelper.InvokeMemberIfAvailable(target, "OnPostprocessGameObjectWithUserProperties", args);
     }
 }
コード例 #27
0
        static Material ProcessMeshAssignMaterial(Renderer renderer, Material material)
        {
            foreach (AssetPostprocessor inst in m_ImportProcessors)
            {
                object[] args             = { material, renderer };
                object   assignedMaterial = AttributeHelper.InvokeMemberIfAvailable(inst, "OnAssignMaterialModel", args);
                if (assignedMaterial as Material)
                {
                    return(assignedMaterial as Material);
                }
            }

            return(null);
        }
コード例 #28
0
 private static void PostprocessAssetbundleNameChanged(string assetPAth, string prevoiusAssetBundleName, string newAssetBundleName)
 {
     object[] args = new object[]
     {
         assetPAth,
         prevoiusAssetBundleName,
         newAssetBundleName
     };
     foreach (Type current in EditorAssemblies.SubclassesOf(typeof(AssetPostprocessor)))
     {
         AssetPostprocessor target = Activator.CreateInstance(current) as AssetPostprocessor;
         AttributeHelper.InvokeMemberIfAvailable(target, "OnPostprocessAssetbundleNameChanged", args);
     }
 }
コード例 #29
0
 private static Material ProcessMeshAssignMaterial(Renderer renderer, Material material)
 {
     foreach (AssetPostprocessor importProcessor in AssetPostprocessingInternal.m_ImportProcessors)
     {
         object[] args = new object[2]
         {
             (object)material,
             (object)renderer
         };
         object obj = AttributeHelper.InvokeMemberIfAvailable((object)importProcessor, "OnAssignMaterialModel", args);
         if ((bool)((UnityEngine.Object)(obj as Material)))
         {
             return(obj as Material);
         }
     }
     return((Material)null);
 }
コード例 #30
0
 private static Material ProcessMeshAssignMaterial(Renderer renderer, Material material)
 {
     foreach (AssetPostprocessor target in AssetPostprocessingInternal.m_ImportProcessors)
     {
         object[] args = new object[]
         {
             material,
             renderer
         };
         object obj = AttributeHelper.InvokeMemberIfAvailable(target, "OnAssignMaterialModel", args);
         if (obj as Material)
         {
             return(obj as Material);
         }
     }
     return(null);
 }