该系列是热更新四部曲(siki学院的03,04属于付费课程,暂时搁置)
热更新第一季《Assetbundle》
热更新第二季《Lua编程》
热更新第三季《xLua基础》
热更新第四季《xLua案例》

01 AssetBundle

AssetBundle(创建打包)入门学习(基于Unity2017)

05-06 写AssetBundle

标记

简单

带文件夹

代码 加载一个

//改名AssetBundle_Write
//写入AssetBundle

using System.IO;
using UnityEditor;public class AssetBundle_Write
{[MenuItem("Assets/Build AssetBundles")]//按钮在菜单栏的位置static void BuildAllAssetBundles(){string dir = "AssetBundles";//是工程根目录,不是Unity的那个Assets目录if (Directory.Exists(dir)==false){Directory.CreateDirectory(dir);}//目录,模式,平台BuildPipeline.BuildAssetBundles(dir, BuildAssetBundleOptions.None,BuildTarget.StandaloneWindows64);}
}

问题 AssetBundles.cs(7,6): error CS0246:

//新建文件夹Editor,将脚本放里面

运行


//在工程根目录,不是Assets改根目录

//名字和后缀名是标记时填的

07 读AssetBundle

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using System.IO;
using UnityEditor;public class AssetBundle_Read : MonoBehaviour
{// Start is called before the first frame updatevoid Start(){ReadAssetBundle();}void ReadAssetBundle(){AssetBundle ab = AssetBundle.LoadFromFile("AssetBundles/plane.unity3d");//必须加后缀GameObject prefab = ab.LoadAsset<GameObject>("plane");//可以不加后缀Instantiate(prefab);}// Update is called once per framevoid Update(){}
}

08-09 分组与策略

模型 类型 时间
更新频率 时间/同时加载 共享 小资源汇总 版本后缀区别
一个assetbundle==一组

10 共享/依赖打包

//两个预制体,用同一种贴图、材质

//不给贴图、材质做标记。打包后大小

//给贴图、材质做标记。打包后大小

11 压缩(LZMA,LZ4,不压缩)

//写AssetBundle(ab)时的方法

BuildPipeline.BuildAssetBundles(dir, BuildAssetBundleOptions.None,BuildTarget.StandaloneWindows64);}

//第二个参数BuildAssetBundleOptions,压缩方式
LZMA,时空比大(时间复杂度较大,空间复杂度较小)
LZ4,时空比小
//以下以最大的文件比较,2050(LZMA)<2643(LZ4)<2845(不压缩)
//分享是shade,shard是碎片(这里翻译名字错了)

//只有LZ4有提示

12 manifest

......
Assets:#资源
- Assets/Prefabs/Plane.prefab
Dependencies:#依赖
- D:/Data/Projects/Unity/AssetBundle/AssetBundles/shard.unity3d

13 依赖

//使用时,保证先加载了贴图和材质,再加载引用材质的/贴图的预制体。实际材质、贴图放前放后没影响(?)
//保证的是使用时(比如实例预制体),改加载的都加载了
//以下是读ab的代码

    void ReadAssetBundle(){//AssetBundle m = AssetBundle.LoadFromFile("AssetBundles/shard.unity3d");//材质、贴图(命名一样了)AssetBundle ab = AssetBundle.LoadFromFile("AssetBundles/plane.unity3d");//必须加后缀//GameObject prefab = ab.LoadAsset<GameObject>("plane");//使用材质、贴图AssetBundle m = AssetBundle.LoadFromFile("AssetBundles/shard.unity3d");//材质、贴图(命名一样了)//Instantiate(prefab);//对应第三张图}

14 从内存读取

同步

    void Start(){LoadAssetBundleFromMemory("AssetBundles/plane.unity3d");}void LoadAssetBundleFromMemory(string path)//内存同步读取{AssetBundleCreateRequest request = AssetBundle.LoadFromMemoryAsync( File.ReadAllBytes( path ) );AssetBundle ab = request.assetBundle;//比如"AssetBundles/plane.unity3d",我要得到"plane"string name = path.Substring(path.LastIndexOf("/") + 1);//截取左后一个"/"后面的(不包括/)name = name.Remove(name.IndexOf("."));//移除.后缀//GameObject prefab = ab.LoadAsset<GameObject>(name);//Instantiate(prefab);}

//洋红是材质、贴图丢失,因为我没加载

异步

    IEnumerator LoadAssetBundleFromMemoryAsync(string path)//内存异步读取{AssetBundleCreateRequest request = AssetBundle.LoadFromMemoryAsync(File.ReadAllBytes(path));//yield return request;//AssetBundle ab = request.assetBundle;//比如"AssetBundles/plane.unity3d",我要得到"plane"string name = path.Substring(path.LastIndexOf("/") + 1);//截取左后一个"/"后面的(不包括/)name = name.Remove(name.IndexOf("."));//移除.后缀//GameObject prefab = ab.LoadAsset<GameObject>(name);//Instantiate(prefab);}

重构05-06的,13。从文件读取

从文件读取 同步 (重构05-06的代码)

    void Start(){string path = "AssetBundles/plane.unity3d";LoadAssetBundleFromFile( path );//文件读取}void LoadAssetBundleFromFile(string path){AssetBundle ab = AssetBundle.LoadFromFile( path );//必须加后缀//比如"AssetBundles/plane.unity3d",我要得到"plane"string name = path.Substring(path.LastIndexOf("/") + 1);//plane.unity3dname = name.Remove(name.IndexOf("."));//plane//GameObject prefab = ab.LoadAsset<GameObject>( name );//Instantiate(prefab);//使用材质、贴图}

从文件读取 异步

    void Start(){string path = "AssetBundles/plane.unity3d";StartCoroutine(LoadAssetBundleFromFileAsync(path) ) ;//文件读取}IEnumerator LoadAssetBundleFromFileAsync(string path){AssetBundleCreateRequest request = AssetBundle.LoadFromMemoryAsync(File.ReadAllBytes(path));//yield return request;//AssetBundle ab = request.assetBundle;//比如"AssetBundles/plane.unity3d",我要得到"plane"string name = path.Substring(path.LastIndexOf("/") + 1);//截取左后一个"/"后面的(不包括/)name = name.Remove(name.IndexOf("."));//移除.后缀//GameObject prefab = ab.LoadAsset<GameObject>(name);//Instantiate(prefab);}

15 WWW From Cache

同步

(问题) 异步 (2018的www.error为NULL)

//问题是要去掉以下代码

        if (string.IsNullOrEmpty(www.error)){print("www错误"+www.error);yield break;}
    void Start(){string path_www = @"file://D:\Data\Projects\Unity\AssetBundle\AssetBundles\plane.unity3d";//\\或\\\都可以StartCoroutine(LoadAssetBundleFromWWWAsync(path_www));}IEnumerator LoadAssetBundleFromWWWAsync(string path)//内存异步读取{//缓存while (Caching.ready == false)//当前缓存{yield return null;}//请求WWW www=WWW.LoadFromCacheOrDownload(path, 1);//路径,版本//yield return www;print("W3"+www);//if (string.IsNullOrEmpty(www.error)){print("www错误"+www.error);yield break;}//assetBundleAssetBundle ab = www.assetBundle;print("ab"+ab);//比如"AssetBundles/plane.unity3d",我要得到"plane"string name = path.Substring(path.LastIndexOf("\\") + 1);//截取左后一个"/"后面的(不包括/)name = name.Remove(name.IndexOf("."));//移除.后缀print("name"+name);//GameObject prefab = ab.LoadAsset<GameObject>(name);//Instantiate(prefab);}

(问题) 预制体broken

//尝试2017,Sphere是从2018拖过来的,实例时发生警告,broken prefab
//plane是在2017做的实例
//解决是在2017再做预制体

(了解) 2018 www过时

//视频的版本是2017.1.0f3
//我的版本是2018.4.32.32f1,www过时了,但是还可以用
//经过测试,不是版本问题

(解决)

//去掉下面的代码就有了
//猜想贴图材质没加载导致break,结果用一个没贴图材质的Cube、3D Text也显示不了。总结就是以下代码删除

        if (string.IsNullOrEmpty(www.error)){print("www错误"+www.error);yield break;}

16 搭建简单Server服务器

任务2:源码工程、PPT.zip【Server服务器】
//注意通过

//拷贝上面生成的AssetBundles到该文件夹

17 www From Download

(问题) 代码

//跟www的本地加载差不多,要注意的是处理名字时,一个是"",一个是"/"。所以加判断

//视频localhost就可以访问网页,使用到unity
//我是localhost访问不到网页,localhost:端口号可以访问到网页,能使用到unity

        string path_www = @"file://D:\Data\Projects\Unity\AssetBundle\AssetBundles\plane.unity3d";//\\或\\\都可以string path_download= @"http://localhost:56201/AssetBundles/plane.unity3d";//\\或\\\都可以path.Substring(path.LastIndexOf("/") + 1);
    void Start(){string path_www = @"file://D:\Data\Projects\Unity\AssetBundle\AssetBundles\plane.unity3d";//\\或\\\都可以string path_download= @"http://localhost:56201/AssetBundles/plane.unity3d";//\\或\\\都可以StartCoroutine(LoadAssetBundleFromWWWAsync(path_download));}IEnumerator LoadAssetBundleFromWWWAsync(string path)//内存异步读取{//缓存while (Caching.ready == false)//当前缓存{yield return null;//等待加载完成}//请求WWW www=WWW.LoadFromCacheOrDownload(path, 1);//路径,版本yield return www;//assetBundleAssetBundle ab = www.assetBundle;//string name = GetName(path);//GameObject prefab = ab.LoadAsset<GameObject>(name);//Instantiate(prefab);}string GetName(string path){//比如"AssetBundles/plane.unity3d",我要得到"plane"string name;if (path.Contains("file")){name = path.Substring(path.LastIndexOf("\\") + 1);//截取左后一个"\"后面的(不包括/)}else if (path.Contains("http")){name = path.Substring(path.LastIndexOf("/") + 1);//截取左后一个"/"后面的(不包括/)}else{throw new System.Exception("异常");}name = name.Remove(name.IndexOf("."));//移除.后缀print("名字" + name);return name;}

18 UnityWebRequest

//变量一,资源来源
从本地
从服务器
//变量二,操作方式
方式一取值
方式二取值
下载(没全讲)

    void Start(){string path_www = @"file://D:\Data\Projects\Unity\AssetBundle\AssetBundles\plane.unity3d";// //或///都可以string path_download= @"http://localhost:56201/AssetBundles/plane.unity3d";//\\或\\\都可以StartCoroutine(LoadAssetBundleFromUnityWebServerAsync(path_www));}string GetName(string path){//比如"AssetBundles/plane.unity3d",我要得到"plane"string name;if (path.Contains("file")){name = path.Substring(path.LastIndexOf("\\") + 1);//截取左后一个"\"后面的(不包括/)}else if (path.Contains("http")){name = path.Substring(path.LastIndexOf("/") + 1);//截取左后一个"/"后面的(不包括/)}else{throw new System.Exception("异常");}name = name.Remove(name.IndexOf("."));//移除.后缀print("名字" + name);return name;}#region UnityWebServerIEnumerator LoadAssetBundleFromUnityWebServerAsync(string path)//内存异步读取{//请求//UnityWebRequest request = UnityWebRequest.GetAssetBundle(path);过时//yield return request.Send();过时//UnityWebRequest request = UnityWebRequestAssetBundle.GetAssetBundle(path);yield return request.SendWebRequest();//等待加载完成AssetBundle ab;if (false)//方式一{ab = DownloadHandlerAssetBundle.GetContent(request);}else if (true)//方式二{ab = (request.downloadHandler as DownloadHandlerAssetBundle).assetBundle;}//string name = GetName(path);//GameObject prefab = ab.LoadAsset<GameObject>(name);//Instantiate(prefab);}

20 通过Manifest得到依赖

    void GetAllDependenciesByManifest(){//得到manifestAssetBundle ab = AssetBundle.LoadFromFile("AssetBundles/AssetBundles");AssetBundleManifest manifest = ab.LoadAsset<AssetBundleManifest>("AssetBundleManifest");//名字是固定的,AssetBundles.manifest是取不到的foreach (string name in manifest.GetAllAssetBundles()){print(name);}string[] strArr = manifest.GetAllDependencies("plane.unity3d");foreach (string name in strArr){print(name);}}

//最后一个是依赖

22 校验

23 图片标记

//图比较大,不自己给标记,系统会自动将所有图片打包

24 AssetBundles-Browser

Unity-Technologies/AssetBundles-Browser
//拖到Editor里面,窗口就有AssetBundle Browser的选项

//StreamingAssets不压缩

//打包

02 Lua

官网
B站
菜鸟
推荐【解压后文件夹5.1,里面的SciTE是编辑器】 Lua for Windows v5.1.5-52 Released

//编辑器有很烦的中文编码问题


--[[模块require "module"--require ("module")--m=require ("module")print(module.num1)print(module.num2)module.func1();func2();
--]]--print("HH");
--11
--[[注释print("HH");
--]]--[[typeprint(type(1));print(type("aa"));print(type(H));print(type(type));print(type(print));print(type(true));print(type(nil));
--]]
--[[tabletable1={key1="value1", key2="value2", key3=2}print(table1)print(table1.key1)print(table1["key2"])print("长度"..#table1)--有key,取不到最大索引--table.key1=niltable1=nil--table2={"value1", "value2",2}print(table2[0])print(table2[2])table2[4]="wr"table2[1]=nilprint("长度"..#table2)--取得最大索引--遍历for k, v in pairs(table2) doprint(k .. " : " .. v)--赋值即引用table1={"句芒",name="鬼车"}table2=table1;table2[3]="天吴"for k,v in pairs(table1)doprint(k,v)endtable2=nilprint(table1)table1=nilprint(table1)--连接table1={"相柳","强良","天吴","鬼车"}print(table.concat(table1))print(table.concat(table1,"、"))print(table.concat(table1,"、",3,4))--插入table1={"相柳","强良","天吴","鬼车"}table.insert(table1,"句芒")for k,v in pairs(table1)doprint(k,v)endtable.insert(table1,2,"萧摩柯")for k,v in pairs(table1)doprint(k,v)end--删除,索引连续table1={"相柳","强良","天吴","鬼车"}table.remove(table1,2)for k,v in pairs(table1)doprint(k,v)end--排序、最大值table1={2,34,5,1,8,9}table.sort(table1)for k,v in pairs(table1)doprint(k,v)endfunction maxn(tab)local maxValue=0;for k,v in pairs(tab)doif(v>maxValue)thenmaxValue=vendendreturn maxValueendprint(maxn(table1))
end
--]]
--[[元表table1={"相柳","强良","天吴","鬼车"}metatable1={}table1=setmetatable(table1,metatable1);--table1=setmetatable({"相柳","强良","天吴","鬼车"},{})print(table1[1])print(metatable1[1])--地址一样print(metatable1)print(getmetatable(table1))--__metatable,禁止访问元表table1=setmetatable({"相柳","强良","天吴","鬼车"},{__metatable="禁止访问元表"})print(table1)print(getmetatable(table1))--__index,处理超范围的keytable1={"相柳","强良","天吴","鬼车"}metatable1={__index=function()return "句芒"end}table1=setmetatable(table1,metatable1);print(table1[5])--table1={"相柳","强良","天吴","鬼车"}table2={}table2[5]="句芒5"metatable1={__index=table2}table1=setmetatable(table1,metatable1);print(table1[5])--__newIndex,新索引走元表不走原表table1=setmetatable({oldKey="相柳"},{__newindex=metatable1});table1.oldKey="句芒"print(table1.oldKey,metatable1.oldKey)table1.newKey="烛九阴"--走元表print(table1.newKey,metatable1.newKey)--__newIndex,新增的走元表步骤table1={}table1=setmetatable({oldKey="相柳"},{__newindex=function(table1, key, value)print("__newindex起作用")rawset(table1, key, "\""..value.."\"")end})table1.oldKey="王猛"table1.newKey="王镇恶"--__newIndex,新增的放到另一个表table1={}table1={"后土"}table2={}metatable1={__newindex=table2}table1=setmetatable(table1,metatable1);table1[2]="元英"print(table1[2], table2[2])--__add,将表2insert到表1table1={"后土"}table2={"李虎","慕容垂"}metatable1={__add=function(tab,newTab)local length=0for k,v in pairs(tab)doif(k>length)thenlength=kendendfor k,v in pairs(newTab)dotable.insert(tab,length+k,v)endreturn newTabend}table1=setmetatable(table1,metatable1)addTab=table1+table2for k,v in pairs(table1)doprint(v)end--__call,表当 函数 时 调用table1={"后土"}metatable1={__call=function(tab,arg)print(arg)end}table1=setmetatable(table1,metatable1)print(table1(5))--__tostring,打印输出table1={"后土","李虎","慕容垂"}metatable1={__tostring=function(tab)str=""for k,v in pairs(tab)dostr=str..vendreturn strend}table1=setmetatable(table1,metatable1)print(table1)
--]]--[[ifif(nil) thenprint("nil==true");elseprint("nil==false");enda=10if(a<3 thenprint("1");else if(a<8) thenprint("2");elseprint("3");end
--]]
--[[numberprint(type(2))print(type(2.2))print(type(0.2))print(type(2e+1))print(type(0.2e-1))print(type(7.8263692594256e-06))print("2" + 6)print("2" + "6")print("2 + 6")print("-2e2" * "6")
--print("error" + 1)
--]]
--[[运算符a=2.2b=2print(a+b)print(a-b)print(a/b)print(a%b)print(a^b)print(true and false)print(true or false)print(not true)--]]
--[[转义符path1="C:\Users\Desktop"path2="C:\\Users\\Desktop"path3="D:\\Users\\Desktop"print(path1)print(path2.."\n"..path3)
--]]
--[[stringstring1 = "this is string1"string2 = 'this is string2'print(string1)print(string2)print(html)--连接print("a" .. 'b')print(157 .. 428)print(#"a赵云")--长度
--]]--[[stringstr="home.It feels good to be home"print("大写:" .. string.upper(str) )print("小写:" .. string.lower(str) )print("长度:" .. string.len(str) )print("长度:" .. #str )--print("替换:" .. string.gsub(str,"home", "country", 1))--次数print("截取:" .. string.sub(str,1,7))--索引--print("查找:" .. string.find(str, "home", 2))--第几个的左右索引,超过就返回比如最后一个--print("复制:" .. string.rep(str,2) )--复制print("反转:".. string.reverse(str) )--print(string.format("%2d+%3d=%4d",1,4,(1+4)))--formatprint(string.format("用户:%s,密码:%s","赵云","12345") )--print( string.char(66))print( string.byte('A') )--正则for word in string.gmatch(str, "%a+") doprint(word)end
--]]--[[function 阶乘function fact(n)if(n==1) thenreturn nelsereturn n*fact(n-1)endendprint(fact(5))fact2=factprint(fact2(3))----]]
--[[数组arr={"帝江","奢比尸","斛律金"}for i=-1,3 do--start,endprint(arr[i])end--arr={{"帝江","奢比尸","斛律金"},{"元宏","刘裕","宗悫"}}for i=1,2 dofor j=1,3 doprint(arr[i][j])endend
--]]
--[[迭代器 pairs ipairsarr={"帝江","奢比尸","斛律金"}arr[5]="元宏"for k,v in pairs(arr) doprint(k,v)endfor k,v in ipairs(arr) doprint(k,v)end--平方function square(state,control)if(control<state) thencontrol=control+1return control,control*controlendendfor i,j in square,3,0 doprint(i,j)end--]]
--[[function 类委托、匿名function fun(tab, fun)for k,v in pairs(tab) dofun(k, v)endendfunction fun1(k, v)print(k..":"..v)endfunction fun2(k, v)print(k.."-"..v)endtab1={key1="高长恭",key2="斛律光"}tab2={key1="韦睿",key2="陈庆之"}fun(tab1, fun1)fun(tab2, fun2)--匿名fun(tab1, function(k,v)print(k.."+"..v);end)a=function(k,v)print(k.."+"..v);end--]]
--[[function 可变参数function average(...)res=0for k,v in pairs(arg) dores=res+vendprint(res/#arg)endaverage()average(1,2)average(3,4,5)average(6,7,8,9)--去除长度function average(...)local arg={...}res=0for k,v in pairs(arg) dores=res+vendprint(res/#arg)endaverage()average(1,2)average(3,4,5)average(6,7,8,9)--]]
--[[全局、局部变量function fun1()a=1local b=2endfun1()print(a,b)--doa=3local b=4endprint(a,b)--]]
--[[多变量赋值a,b,c=1,2,"qwer"print(a,b,c)a,b,c=1,2print(a,b,c)a,b=1,2,"qwer"print(a,b,c)function fun1()return 1,2end--a=fun1()print(a)a,b=fun1()print(a,b)--]]--[[循环 while fora=0while a<10 doa=a+1if a%2==1 thenprint(a)endend--for i=1,10,2 doprint(i)endfor i=10,1,-1 doprint(i)end--a=1repeata=a+1print(a)until(a>5)--嵌套for i=1,10 doj=1while j<=i doprint(j)j=j+1endend
--for i=1,10 doj=1repeatprint(j)j=j+1until j>iend--]]--[[协程--resumefunction add(a,b)print(a+b)endco=coroutine.create(add)coroutine.resume(co,1,3)--wrapfunction add(a,b)print(a+b)endco=coroutine.wrap(add)co(1,5)--yield(),暂停,二次不用传参function add(a,b)print(a+b)coroutine.yield()print(a-b)endco=coroutine.wrap(add)co(1,5)print("主程")co()--yield有参与resume,第一个参数是true/falsefunction add(a,b)print(a)coroutine.yield(a+b,a-b)return a*bendcor=coroutine.create(add)res1,res2,res3=coroutine.resume(cor,1,5)print(res1,res2,res3)print("主程resume")res4,res5=coroutine.resume(cor)print(res4,res5)
--status状态,suspended暂停的,runningfunction add(a,b)print(coroutine.running())print("2"..coroutine.status(co))coroutine.yield(a+b,a-b)return a*bendco=coroutine.create(add)print("1"..coroutine.status(co))coroutine.resume(co,2,3)print("3"..coroutine.status(co))print(coroutine.running())coroutine.resume(co,2,3)print("4"..coroutine.status(co))--多次yieldfunction foo (a)print("foo 函数输出", a)return coroutine.yield(2 * a) -- 返回  2*a 的值endco = coroutine.create(function (a , b)print("第一次协同程序执行输出", a, b) -- co-body 1 10local r = foo(a + 1)print("第二次协同程序执行输出", r)local r, s = coroutine.yield(a + b, a - b)  -- a,b的值为第一次调用协同程序时传入print("第三次协同程序执行输出", r, s)return b, "结束协同程序"                   -- b的值为第二次调用协同程序时传入end)print("main", coroutine.resume(co, 1, 10)) -- true, 4print("---分割线----")print("main", coroutine.resume(co, "r")) -- true 11 -9print("---分割线---")print("main", coroutine.resume(co, "x", "y")) -- true 10 endprint("---分割线---")print("main", coroutine.resume(co, "x", "y")) -- cannot resume dead coroutineprint("---分割线---")--]]--[[IO 文件(有中文乱码问题)--行读 rfile=io.open("file.txt","r")io.input(file)print(io.read())print(io.read())print(io.read())print(io.read())print(io.read())print(io.read())io.close(file)--w,覆盖--增,a 完全模式file=io.open("file.txt","a")io.output(file)io.write("谁都想拥有情人完整的心")io.close(file)--全读,*afile=io.open("file.txt","r")io.input(file)print(io.read("*a"))io.close(file)--字读 ,连着读file=io.open("file.txt","r")io.input(file)print(io.read(10))print(io.read(10))io.close(file)--完全模式--]]---[[垃圾回收mytable = {"apple", "orange", "banana"}print(collectgarbage("count"))mytable = nilprint(collectgarbage("count"))print(collectgarbage("collect"))--做一次完整的垃圾收集循环print(collectgarbage("count"))--]]---[[面向对象--person,通过 .person={name="尚可云",age=18,eat=function()print("eat()")end}person.eat()--selfperson={name="尚可云",age=18,eat=function(self)print(self.name.."eat()")end}a=personperson=nila.eat(a)--通过 :, 自动赋值 self, 读取也是 :person={name="祖逖",age=18}function person:eat()print(self.name.."eat()")enda=persona:eat()--构造对象 == 实例person={name="许靖"}function person:eat()print(self.name.."eat()")endfunction person:new()local t={}setmetatable(t,{__index=self})return tendperson1=person:new()person1.name="高阜"person1:eat()-- == 多态person={name="吴明彻"}function person:eat()print(self.name.."eat()")endfunction person:new(o)t=o or {}--setmetatable(t,{__index=self})setmetatable(t,self)self.__index=selfreturn tendperson1=person:new( {sex="男"} )print(person1.sex)-- ==继承person={name="岳飞"}function person:eat()print(self.name.."eat()")endfunction person:new()local t={}setmetatable(t,{__index=self})return tendhero=person:new()hero1=hero:new()hero1.name="岳云"hero1:eat()
--]]

Unity【01 AssetBundle】【02 Lua】相关推荐

  1. android 线程池 阻塞队列,【Android框架进阶〖02〗】ThinkAndroid线程池机制

    /************************************************************************************************** ...

  2. 【英语单词2017 06 02 1】

    indebted a. 负债的,感激的 liberate sth from sth 把......从......中解放出来 confines n.约束,限制 wardrobe n. 衣柜:(一个人的) ...

  3. 【英语单词2017 06 02 2】

    rubbish dump 垃圾堆 sprawling   蔓延的 landfill    垃圾填埋场 constitute  构成,组织 lead   导致,造成 give up on 放弃 migr ...

  4. 【01背包求方案数模板】洛谷 P1164 小A点菜

    洛谷 P1164 小A点菜 https://www.luogu.org/problemnew/show/P1164 题目背景 uim神犇拿到了uoi的ra(镭牌)后,立刻拉着基友小A到了一家--餐馆, ...

  5. 【转】【Unity+Lua】实测如何性能优化(Lua和C#交互篇)

    [转][Unity+Lua]实测如何性能优化(Lua和C#交互篇) https://blog.csdn.net/swj524152416/article/details/71125478 posted ...

  6. 【模型】【课程笔记】01+02+03 金融风险管理导论

    本文为课程<金融风险管理>第1-3章学习笔记,用于知识点总结和复习,对应教材<Quantitative Risk Management(2015)>,标号为原版书公式以便查阅. ...

  7. 【木头Cocos2d-x 026】Lua篇(第01章):让Lua和C++牵手

    [木头Cocos2d-x 026]Lua篇(第01章):让Lua和C++牵手 网上关于Lua的教程似乎还没有泛滥,最近刚好学习在Cocos2d-x使用Lua,当然了,我是写教程狂,我会分享我的学习心得 ...

  8. 【Unity自学01】3DMax模型导入Unity轴与尺寸的注意事项

    [Unity自学01]3DMax模型导入Unity轴与尺寸的注意事项 一.轴的设置 用3Dmax打开模型后,默认的坐标系为z轴朝上,与Unity中的坐标系(Y轴朝上)不一样,需做一下修改. 1.选中模 ...

  9. 【Lua】ToLua逻辑热更新

    1 前言 Lua基础语法 中系统介绍了 Lua 的语法体系,xLua逻辑热更新 中介绍了 xLua 的应用,本文将进一步介绍 Unity3D 中基于 ToLua 实现逻辑热更新. 逻辑热更新是指:在保 ...

最新文章

  1. php网站适合优化_php开发大型网站如何优化的方案详解
  2. x86汇编从实模式到保护模式-程序加载器
  3. kotlin学习之类的扩展(四)
  4. abd shell关闭所有程序_一个 Shell 脚本逆袭的规范,拿走不谢
  5. 关于如何用od反汇编win32 控制台程序
  6. 一步步编写操作系统 35 内存为何要分页
  7. REVERSE-PRACTICE-BUUCTF-19
  8. 云服务器文件传输问题
  9. skynet源码分析5:lua绑定之地基
  10. flume java 安装部署_[Hadoop] Flume安装部署与简单使用
  11. 「三分钟系列03」3分钟看懂什么是三次握手/四次挥手
  12. keil+flymcu+CubeMX开发STM32F407
  13. 什么是自媒体知识付费
  14. html5 canvas 在线图片转换器
  15. 【UEFI实战】Intel开源固件项目
  16. 函数逼近和曲线拟合、插值
  17. 中国生活垃圾处理行业十四五规划与投融资模式分析报告2022~2028年
  18. 危机管理应遵循哪些原则?
  19. 普通打印机如何在A4纸上打印不同内容的标签
  20. IOC之bean之间的关系讲解

热门文章

  1. 在传统连连看游戏的基础上设计出新游戏增量式的创新(结对编程)(2011212026徐颖 2011212023 裴乐)
  2. android usb采集卡,USB HDMI直播采集卡1805怎么用?
  3. matlab学习笔记3(控制系统仿真)
  4. 该选国企,外企还是私企?
  5. centos7 解决硬盘内存爆满
  6. SSL-TLS 双向认证(一) -- SSL-TLS工作原理
  7. zabbix监控域名到期时间
  8. 推荐系统_(一)算法详解
  9. 2021年全球与中国农用拖拉机变速器行业市场规模及发展前景分析
  10. 论文《Low Compute and Fully Parallel Computer Vision with 哈希匹配》学习