Exemplo n.º 1
0
 private void Open()
 {
     if (Path == null)
     {
         throw new ArgumentException();
     }
     Stop();
     movieTexture            = AssetBundle.Current.LoadUnityAsset <UnityEngine.MovieTexture>(Path + ".ogv");
     movieTexture.loop       = false;
     movieTexture.wrapMode   = UnityEngine.TextureWrapMode.Clamp;
     movieTexture.filterMode = UnityEngine.FilterMode.Bilinear;
     foreach (var i in new string[] { "_alpha.ogv", "_Alpha.ogv" })
     {
         if (AssetBundle.Current.FileExists(Path + i))
         {
             alphaMovieTexture            = AssetBundle.Current.LoadUnityAsset <UnityEngine.MovieTexture>(Path + i);
             alphaMovieTexture.loop       = false;
             alphaMovieTexture.wrapMode   = UnityEngine.TextureWrapMode.Clamp;
             alphaMovieTexture.filterMode = UnityEngine.FilterMode.Bilinear;
             break;
         }
     }
     if (alphaMovieTexture != null)
     {
         var alpha = new MovieTexture();
         alpha.movieTexture = alphaMovieTexture;
         AlphaTexture       = alpha;
     }
     opened = true;
 }
Exemplo n.º 2
0
        public override void ReadFrom(object obj)
        {
            base.ReadFrom(obj);
            if (obj == null)
            {
                return;
            }
#if !UNITY_ANDROID && !UNITY_IOS && !UNITY_WEBGL
            UnityEngine.MovieTexture o = (UnityEngine.MovieTexture)obj;
            loop = o.loop;
#endif
        }
Exemplo n.º 3
0
        public override object WriteTo(object obj, System.Collections.Generic.Dictionary <long, UnityEngine.Object> objects)
        {
            obj = base.WriteTo(obj, objects);
            if (obj == null)
            {
                return(null);
            }
#if !UNITY_ANDROID && !UNITY_IOS && !UNITY_WEBGL
            UnityEngine.MovieTexture o = (UnityEngine.MovieTexture)obj;
            o.loop = loop;
            return(o);
#else
            return(obj);
#endif
        }
        static int _m_GetMovieTexture(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);


                UnityEngine.WWW __cl_gen_to_be_invoked = (UnityEngine.WWW)translator.FastGetCSObj(L, 1);



                {
                    UnityEngine.MovieTexture __cl_gen_ret = __cl_gen_to_be_invoked.GetMovieTexture(  );
                    translator.Push(L, __cl_gen_ret);



                    return(1);
                }
            } catch (System.Exception __gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + __gen_e));
            }
        }
Exemplo n.º 5
0
 internal virtual void ReceivedMovieTexture(UnityEngine.MovieTexture tex)
 {
     // Trigger a state 3:
     readyState = 3;
 }