private void Awake() { string path = "map/commontexture/Distortion2.unity3d"; Engine.ITexture mapTex = null; Engine.RareEngine.Instance().GetRenderSystem().CreateTexture(ref path, ref mapTex, null, null, Engine.TaskPriority.TaskPriority_Immediate); texture = mapTex.GetTexture(); shader = Shader.Find("HeatDistortion"); }
private void LoadBg(string bgPath) { ReleaseTex(); if (null != m__TextureBg) { if (!string.IsNullOrEmpty(bgPath)) { Engine.RareEngine.Instance().GetRenderSystem().CreateTexture(ref bgPath, ref m_texture, null, null, Engine.TaskPriority.TaskPriority_Immediate); if (m_texture != null) { m__TextureBg.mainTexture = m_texture.GetTexture(); //m__TextureBg.MakePixelPerfect(); } } } }
static int _m_GetTexture(RealStatePtr L) { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); Engine.ITexture __cl_gen_to_be_invoked = (Engine.ITexture)translator.FastGetCSObj(L, 1); try { { UnityEngine.Texture __cl_gen_ret = __cl_gen_to_be_invoked.GetTexture( ); translator.Push(L, __cl_gen_ret); return(1); } } catch (System.Exception __gen_e) { return(LuaAPI.luaL_error(L, "c# exception:" + __gen_e)); } }