ResKit非模拟模式报错,找不到资源
mogocat opened this issue · 12 comments
mogocat commented
liangxiegame commented
非模拟模式需要调用 ResKit.Init
| |
凉鞋
|
|
***@***.***
|
---- 回复的原邮件 ----
| 发件人 | ***@***.***> |
| 发送日期 | 2023年5月26日 14:03 |
| 收件人 | ***@***.***> |
| 抄送人 | ***@***.***> |
| 主题 | [liangxiegame/QFramework] ResKit非模拟模式报错,找不到资源 (Issue #110) |
按照教程走的,我标记了一个文件夹,模拟模式下可以正确加载资源,非模拟模式下,重新打包一次,显示打包成功,但是运行的时候显示加载为空,找不到该资源。
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: ***@***.***>
mogocat commented
调用了,
ResKit.Init();
if (slots[0].IsNotNull())
{
return;
}
lockLabel.gameObject.SetActive(false);
var slotPrefab = mResLoader.LoadSync<RoomSlot>("RoomSlot");
mogocat commented
我看了源码,Init可以多次调用,第二次调用会自动跳过。所以我在需要的时候都会提前调用一次,没有特意区分模拟模式和真机模式。
liangxiegame commented
资源在文件夹里还是在文件夹的文件夹里?
目前只支持文件夹里的资源 不支持子文件夹
| |
凉鞋
|
|
***@***.***
|
---- 回复的原邮件 ----
| 发件人 | ***@***.***> |
| 发送日期 | 2023年5月26日 14:08 |
| 收件人 | ***@***.***> |
| 抄送人 | ***@***.***> ,
***@***.***> |
| 主题 | Re: [liangxiegame/QFramework] ResKit非模拟模式报错,找不到资源 (Issue #110) |
我看了源码,Init可以多次调用,第二次调用会自动跳过。所以我在需要的时候都会提前调用一次,没有特意区分模拟模式和真机模式。
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you commented.Message ID: ***@***.***>
mogocat commented
liangxiegame commented
类型需要写 GameObject 不能是 RoomSlot
| |
凉鞋
|
|
***@***.***
|
---- 回复的原邮件 ----
| 发件人 | ***@***.***> |
| 发送日期 | 2023年5月26日 14:05 |
| 收件人 | ***@***.***> |
| 抄送人 | ***@***.***> ,
***@***.***> |
| 主题 | Re: [liangxiegame/QFramework] ResKit非模拟模式报错,找不到资源 (Issue #110) |
调用了,
if (slots[0].IsNotNull())
{
return;
}
lockLabel.gameObject.SetActive(false);
var slotPrefab = mResLoader.LoadSync<RoomSlot>("RoomSlot");
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you commented.Message ID: ***@***.***>
mogocat commented
子类型不支持吗?只能按Gameobject加载,然后GetComponent吗?
liangxiegame commented
对的 一般都是不支持的 因为加载的是 GameObject 是 prefab
| |
凉鞋
|
|
***@***.***
|
---- 回复的原邮件 ----
| 发件人 | ***@***.***> |
| 发送日期 | 2023年5月26日 14:13 |
| 收件人 | ***@***.***> |
| 抄送人 | ***@***.***> ,
***@***.***> |
| 主题 | Re: [liangxiegame/QFramework] ResKit非模拟模式报错,找不到资源 (Issue #110) |
子类型不支持吗?只能按Gameobject加载,然后GetComponent吗?
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you commented.Message ID: ***@***.***>
mogocat commented
文档里是不是可以标注一下,我一直用Resources加载,这样写写习惯了,而且模拟模式还是没问题的,所以一直没改。真机模式无法实现这种功能吗?
liangxiegame commented
可以的
| |
凉鞋
|
|
***@***.***
|
---- 回复的原邮件 ----
| 发件人 | ***@***.***> |
| 发送日期 | 2023年5月26日 14:24 |
| 收件人 | ***@***.***> |
| 抄送人 | ***@***.***> ,
***@***.***> |
| 主题 | Re: [liangxiegame/QFramework] ResKit非模拟模式报错,找不到资源 (Issue #110) |
文档里是不是可以标注一下,我一直用Resources加载,这样写写习惯了,而且模拟模式还是没问题的,所以一直没改。真机模式无法实现这种功能吗?
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you commented.Message ID: ***@***.***>
mogocat commented
好的,感谢反馈!
liangxiegame commented
v1.0.58 LoadSync 支持完好 但是 Add2Load 支持得不是很好 具体可以看下示例 9.LoadPrefabByMonoType 异步加载支持会在后边慢慢完善 需要改一些底层
| |
凉鞋
|
|
***@***.***
|
---- 回复的原邮件 ----
| 发件人 | ***@***.***> |
| 发送日期 | 2023年5月26日 14:24 |
| 收件人 | ***@***.***> |
| 抄送人 | ***@***.***> ,
***@***.***> |
| 主题 | Re: [liangxiegame/QFramework] ResKit非模拟模式报错,找不到资源 (Issue #110) |
文档里是不是可以标注一下,我一直用Resources加载,这样写写习惯了,而且模拟模式还是没问题的,所以一直没改。真机模式无法实现这种功能吗?
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you commented.Message ID: ***@***.***>


