yomunsam / tinax Goto Github PK
View Code? Open in Web Editor NEWTinaX Framework : Unity based Game Client Framework | 基于 Unity 的游戏客户端开发框架
Home Page: https://tinax.corala.space
License: Other
TinaX Framework : Unity based Game Client Framework | 基于 Unity 的游戏客户端开发框架
Home Page: https://tinax.corala.space
License: Other
能否是漏传了 Odin 插件
rt
TinaX6.5.x预览版本,
使用IL2CPP方式构建的真机包中,有一定几率在启动时卡死,不会触发任何业务逻辑层面的入口代码。
在Android、iOS平台复现必现,UWP IL2CPP不会触发bug
我看 项目中有 转 后缀的脚本 但是在实际开发中 一般都会配合 luacheck 之类的🚌
txt 后缀 有点不太好处理这些
假设有ab包A
,B
,c
其中,A
和B
依赖c
首先加载A
, 这时候依赖c
也会跟着被加载,没问题,
然后在异步加载B
的同时卸载A
包,就出问题了:
B
的异步加载流程首先检查依赖c
,发现已经被加载了,B
本体的过程中,卸载A
(此时c
的引用计数器是1
)会导致c
的引用计数器归零,触发c
的卸载B
包异步加载结束之后,对B
和B
的依赖c
执行计数器+1,于是c
的计数器为1
,但AB包已经被卸载了Hi!
This framework is awesome!
For easy to getting start, could you please add more example for demo using Panel, Dialog and How to use the controller class to handle logic code
Thank so much!
我想要按照文件夹去读取和执行lua文件,但是现在只能一个个Require,当lua文件多了后看起来十分的乱......
RT
在静音状态下,切换到另一首歌时,又有声音
静音后静静等待第二首歌播放
然后具体各个模块的配置,加载逻辑等等,是用Unity的.asset
的配置功能放在Assets目录下的某个固定位置的。
改进的构想首先是脱离对.asset
的默认依赖,一方面,Assets目录看起来更干净了,
对应的,我们可以直接把配置写在XCore的注册阶段,就大概像这样
IXCore core = XCore.CreateDefault()
.AddILRuntime(options =>
{
options.LoadAssemblies.Add("Assets/Game/Assemblies/TinaDev.Hot.dll.bytes",
"Assets/Game/Assemblies/TinaDev.Hot.pdb.bytes");
})
.AddVFS(options =>
{
options.AddSimpleGroup(
"Assets/App/Scenes",
"Assets/App/UI",
"Assets/Arts/UI/Images"
);
});
然后在此基础上,我们可以更方便的扩展一些配置来源,比如我们依然可以使用.asset
配置文件:
IXCore core = XCore.CreateDefault()
.AddILRuntime(options =>
{
options.SetOptionsFromUnityAssets("Assets/xxx/xxx");
});
在上面这个实现中,SetOptionsFromUnityAssets
可以是异步的,并且实际执行的时机是在对应的服务启动阶段。
以及,我们可以使用更像现代 .NET 的写法:
IXCore core = XCore.CreateDefault()
.AddILRuntime((options, configuration) =>
{
configuration.Bind(options);
})
其中上面这个configuration
对应的是IConfiguration
接口,在当前版本中也是存在的,它是对Microsoft.Extensions.Configuration
的简化搬运,而这个接口也是可以自定义各种配置提供者来源,比如常见的从json文件、从命令行参数、从热更新补丁、从服务器等。
如此设计的优点是可定制的自由度更高
当前这个设计的一大弊端就是,对于小项目来说变得麻烦了。问题在于Editor功能,比如说Editor功能要对资产打包Assetbundle的话,以前Edtior功能是直接读.asset
配置文件的,而现在runtime的配置必须把程序跑起来才能确定,对于Editor来说就没法解决了。
解决方法的构想的话,
.asset
下面这段只是构想阶段,还没实现
比方说,在默认情况下,我们写runtime的XCore:
IXCore core = XCore.CreateDefault()
.AddILRuntime()
这时候对于这个功能模块来说它就默认继续使用.asset
配置,于是对应的,我们不需要对Editor做任何改动,它还是继续去读.asset
好了。就和当前版本的情况一样。
而比如说,我们runtime下添加了自定义配置:
IXCore core = XCore.CreateDefault()
.AddILRuntime(options =>{
options.LoadAssemblies.Add("Assets/Game/Assemblies/TinaDev.Hot.dll.bytes",
"Assets/Game/Assemblies/TinaDev.Hot.pdb.bytes");
});
对应的我们可能就得给Editor也专门写一段代码:
#if UNITY_EDITOR
using TinaXEditor.XILRuntime;
public static class XILRuntimeDefine
{
[EditorXILRuntimeOptions]
public static XILRuntimeOptions GetOptions()
{
var options = new XILRuntimeOptions();
options.EditorLoadAssemblyPaths.Add("Assets/Game/Assemblies/TinaDev.Hot.dll.bytes",
"Assets/Game/Assemblies/TinaDev.Hot.pdb.bytes");
}
}
#endif
不过,这个设定其实并不需要XCore做任何特殊处理,完全是各个功能模块可以各自考虑的问题,也许我们可以把部分配置内容比较简单的模块先这么搞搞看
大概记录下有这么个事要做,怕忘了
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.