コード例 #1
0
        public static void Import(string path, out Texture2D spotlightCookie, out Cubemap pointLightCookie, int resolution = 128, bool enhancedImport = false, bool applyVignette = true)
        {
            spotlightCookie  = null;
            pointLightCookie = null;
            if (!RuntimeIESImporter.IsFileValid(path))
            {
                return;
            }
            GameObject   obj;
            IESConverter iesConverter;

            RuntimeIESImporter.GetIESConverterAndCubeSphere(enhancedImport, resolution, out obj, out iesConverter);
            RuntimeIESImporter.ImportIES(path, iesConverter, true, applyVignette, out spotlightCookie, out pointLightCookie);
            UnityEngine.Object.Destroy(obj);
        }
コード例 #2
0
        public static Cubemap ImportPointLightCookie(string path, int resolution = 128, bool enhancedImport = false)
        {
            if (!RuntimeIESImporter.IsFileValid(path))
            {
                return(null);
            }
            GameObject   obj;
            IESConverter iesConverter;

            RuntimeIESImporter.GetIESConverterAndCubeSphere(enhancedImport, resolution, out obj, out iesConverter);
            Texture2D texture2D;
            Cubemap   result;

            RuntimeIESImporter.ImportIES(path, iesConverter, false, false, out texture2D, out result);
            UnityEngine.Object.Destroy(obj);
            return(result);
        }
コード例 #3
0
        public static Texture2D ImportSpotlightCookie(string path, int resolution = 128, bool enhancedImport = false, bool applyVignette = true)
        {
            if (!RuntimeIESImporter.IsFileValid(path))
            {
                return(null);
            }
            GameObject   obj;
            IESConverter iesConverter;

            RuntimeIESImporter.GetIESConverterAndCubeSphere(enhancedImport, resolution, out obj, out iesConverter);
            Texture2D result;
            Cubemap   cubemap;

            RuntimeIESImporter.ImportIES(path, iesConverter, true, applyVignette, out result, out cubemap);
            UnityEngine.Object.Destroy(obj);
            return(result);
        }