示例#1
0
		public static LuaTable AddLuaComponent(GameObject go, string luaPath, params object[] args)
		{
			LuaBehaviour luaBehaviour = go.AddComponent<LuaBehaviour>();
			luaBehaviour.m_LuaPath = luaPath;
			luaBehaviour.InitLua(args);
			return luaBehaviour.LuaTable;
		}
		void Awake()
		{
			LuaBehaviour behaviour = gameObject.GetComponent<LuaBehaviour>();
			m_LuaTable = behaviour ? behaviour.LuaTable : null;
		}