Esempio n. 1
0
        internal static byte[] loadFile(string fn)
        {
            try
            {
                byte[] bytes;
                if (loaderDelegate != null)
                {
                    bytes = loaderDelegate(fn);
                }
                else
                {
                    fn = fn.Replace(".", "/");
                    TextAsset asset = (TextAsset)Resources.Load(fn);
                    if (asset == null)
                    {
                        return(null);
                    }
                    bytes = asset.bytes;
                }

                DebugInterface.require(fn, bytes);
                return(bytes);
            }
            catch (Exception e)
            {
                throw new Exception(e.Message);
            }
        }
Esempio n. 2
0
 public void init()
 {
     if(openDebug) {
         di = new DebugInterface(state);
         di.init();
     }
 }
Esempio n. 3
0
        internal static byte[] loadFile(string fn)
        {
            try
            {
                byte[] bytes;
                if (loaderDelegate != null)
                {
                    bytes = loaderDelegate(fn);
                }
                else
                {
                    fn = fn.Replace(".", "/");
#if !SLUA_STANDALONE
                    TextAsset asset = (TextAsset)Resources.Load(fn);
                    if (asset == null)
                    {
                        return(null);
                    }
                    bytes = asset.bytes;
#else
                    bytes = File.ReadAllBytes(fn);
#endif
                }

                if (bytes != null)
                {
                    DebugInterface.require(fn, bytes);
                }
                return(bytes);
            }
            catch (Exception e)
            {
                throw new Exception(e.Message);
            }
        }
Esempio n. 4
0
 public void init()
 {
     if (openDebug)
     {
         di = new DebugInterface(state);
         di.init();
     }
 }
Esempio n. 5
0
		public DebugInterface(LuaState L)
		{
			state=L;
			instance=this;

			IntPtr l = L.L;
			getTypeTable(l, "LuaDebugger");
			addMember(l, output, false);
			addMember(l, onBreak, false);
			addMember(l, md5, false);
			createTypeMetatable(l, typeof(DebugInterface));
		}
Esempio n. 6
0
        public DebugInterface(LuaState L)
        {
            state    = L;
            instance = this;

            IntPtr l = L.L;

            getTypeTable(l, "LuaDebugger");
            addMember(l, output, false);
            addMember(l, onBreak, false);
            addMember(l, md5, false);
            createTypeMetatable(l, typeof(DebugInterface));
        }
        // make sure lua state finalize at last
        // make sure LuaSvrGameObject excute order is max(9999)
        void OnDestroy()
        {
            if (state != null)
            {
                if (di != null)
                {
                    di.close();
                    di = null;
                }

                state.Dispose();
                state = null;
            }
        }
Esempio n. 8
0
        void OnDestroy()
        {
            if (state != null)
            {
                if (di != null)
                {
                    di.close();
                    di = null;
                }

                // state is disposed by editorapplication if in the Editor
                // state isn't disposed in App because that all resources will be disposed by app on process exit.
            }
        }
Esempio n. 9
0
        // make sure lua state finalize at last
        // make sure LuaSvrGameObject excute order is max(9999)
        void OnDestroy()
        {
            if (state != null)
            {
                if (di != null)
                {
                    di.close();
                    di = null;
                }

                state.Dispose();
                state = null;
            }
        }
Esempio n. 10
0
		void OnDestroy()
		{
			if (state != null)
			{
				if (di != null)
				{
					di.close();
					di = null;
				}

				// state is disposed by editorapplication if in the Editor
				// state isn't disposed in App because that all resources will be disposed by app on process exit.
			}
		}
Esempio n. 11
0
        // make sure lua state finalize at last
        // make sure LuaSvrGameObject excute order is max(9999)
        void OnDestroy()
        {
            if (state != null)
            {
                if (di != null)
                {
                    di.close();
                    di = null;
                }

                // Main state shouldn't dispose until app quit due to some mono behaviour use state on disposed
                //

                //state.Dispose();
                //state = null;
            }
        }
Esempio n. 12
0
        // make sure lua state finalize at last
        // make sure LuaSvrGameObject excute order is max(9999)
        void OnDestroy()
        {
            if (state != null)
            {
                if (di != null)
                {
                    di.close();
                    di = null;
                }

                // Main state shouldn't dispose until app quit due to some mono behaviour use state on disposed
                //

                //state.Dispose();
                //state = null;
            }
        }