BUG:在场景中,直接生成物体报错。BUG:シーンでは、物体エラーを直接生成する。BUG: In the scene, generating objects directly reports an error.

V 1.1.0

问题描述:(以前的版本中没出现这个问题,另外,此报错并不影响游戏运行。)

新版本升级后,如果在根场景下直接生成一个物体,打开项目会出现报错。

(经过排查,发现错误出现的具体位置)

1 在物体下,生成BaseSettings,会生成2行报错。

2 在物体下,生成CollisionShape2D,又会生成2行错误。

3 如果删除BaseSettings 和 CollisionShape2D,讲不再报错。

4 如果不删除,用F5运行游戏,也会停止报错,不过重启项目依然会报错。

5 认为这是个BUG。

問題の説明:(以前のバージョンではこの問題は発生していません,また、このエラーはゲームの実行に影響しません。)
新しいバージョンがアップグレードされると、ルートシーンの下にオブジェクトが直接生成されると、プロジェクトを開くとエラーが発生します。
(調査の結果、エラーが発生した具体的な場所を発見)
1オブジェクトの下でBaseSettingsを生成すると、2行のエラーが生成されます。
2オブジェクトの下でCollisionShape 2 Dが生成され、2行のエラーが生成されます。
3 BaseSettingsとCollisionShape 2 Dを削除すると、エラーは発生しません。
4削除せずにF 5でゲームを実行すると、エラーの報告も停止しますが、再起動してもエラーが発生します。
5これはBUGだと思います。

Problem description:(This issue did not occur in previous versions,Additionally, this error does not affect the operation of the game.)

After the new version upgrade, if an object is directly generated in the root scene, an error message will appear when opening the project.
(After investigation, the specific location where the error occurred was found)

Under the object, generating BaseSettings will generate 2 lines of error messages.
Under the object, generating CollisionShape2D will generate 2 more lines of errors.

If BaseSettings and CollisionShape2D are deleted, there will be no more errors.
If not deleted, running the game with F5 will also stop reporting errors, but restarting the project will still result in errors.

thinks this is a bug.

BUG:生成物体报错问题.rar (181.5 KB)

最小复现:

1 下载并解压项目,加载。

2 打开项目后直接可以看到报错。(4条)

3 删除BaseSettings和CollisionShape2d节点,(每个节点减少两个报错。)

4 还没有追加其他节点测试是否会报错。

最小再現:
1プロジェクトをダウンロードして解凍し、ロードします。
2プロジェクトを開くとエラーが表示されます。(4条)
3 BaseSettingsとCollisionShape 2 dノードを削除します(ノードごとに2つのエラーを軽減します。)
4他のノードを追加してエラーが発生するかどうかをテストしていません。

Minimum reproduction:

Download and unzip the project, then load it.

After opening the project, you can directly see the error message. (4 articles)

Delete BaseSettings and CollisionShape2d nodes (reduce two error messages per node)

We haven’t added any other nodes yet to test if there will be any errors.

我们昨晚发现了这个问题,目前正在调查中。您说得对,这在之前的版本中并未出现,因此我们将其视为一个漏洞。

  • 这不应该影响游戏,只是控制台报错,令人烦恼。
  • 如果您想消除这些错误,可以将该游戏对象保存为场景,错误就会消失。不过我知道并非所有情况都能这样做。

这基本上就是问题所在:AGMaker 会对未保存为场景的游戏对象报错,我们将对此进行调查并希望能修复。

某些变量无法访问,但如果它们本就不应被访问,那么至少应该将其隐藏。不过,我们应尝试使其变得可行。

感谢你的回复。

你说的对,如果把物体保存成场景,就不会出现这个报错。(我原本的项目中,有一个物体场景,然后在主场景中,把它实例化,就没产生报错。)

但是从长远角度,会出现问题。
(1)有很多这种物体,是在场景中,起到临时控制的作用,如果每个物体都保存成场景,项目中会需要大量保存物体成场景,会很冗余。

(2)如果忽略这个问题,一直大量报错会很头疼。我的另一个项目文件,一打开会报100多个错,因为放置了太多这种临时生成的物体。

所以还是希望官方能给出一个更好的解决办法。

Thank you for your reply.

You’re right, if you save the object as a scene, this error won’t occur. In my original project, there was an object scene, and when I instantiated it in the main scene, no error occurred

However, in the long run, problems may arise.

(1) There are many such objects that serve as temporary controls in the scene. If each object is saved as a scene, a large number of objects will need to be saved as scenes in the project, which will be redundant.

(2) If we ignore this issue, it will be very troublesome to keep reporting a large number of errors. My other project file, when opened, will report over 100 errors because too many of these temporarily generated objects have been placed.

So I still hope that the official can provide a better solution.

解决方案:

(1)我把所有临时创建的game object,都保存成了场景,消除了所有的报错。

(2)目前来看这个方案,已经解决了问题,也没对项目有太大影响。

(3)现在看来,game object的正确使用方案,是直接通过AGM提供的入口,直接生成“物体场景”,然后在应用到主场景中,是一个比较好的使用方案。如果要即兴在主场景中生成gameobject,就将其保存成场景,就没问题了。目前来说这是最优解。

ソリューション:
(1)私は一時的に作成されたゲームオブジェクトをすべてシーンに保存し、すべてのエラーを解消しました。
(2)現在この方案を見て、すでに問題を解決して、プロジェクトにもあまり影響がありません。
(3)今から見れば、game objectの正しい使用方案は、AGMが提供する入り口を直接通じて、直接「物体シーン」を生成し、それから主シーンに応用する中で、比較的に良い使用方案である。即興でメインシーンにgameobjectを生成するなら、それをシーンとして保存すれば問題ありません。今のところこれが最適解です。

Solution:
(1) I saved all temporarily created game objects as scenes and eliminated all errors.
(2) At present, this plan has solved the problem and has not had a significant impact on the project.
(3) Now it seems that the correct way to use game objects is to directly generate “object scenes” through the entrance provided by AGM, and then apply them to the main scene, which is a good usage plan. If you want to improvise and generate a gameobject in the main scene, save it as a scene, and that’s no problem. Currently, this is the optimal solution.

我今天早上查看了待办事项列表,应该在下一个补丁中修复!

因此,“未保存的游戏对象”仍将是一个问题。

谢谢先生,祝您今天愉快!

1 个赞

此bug已经在V1.1.1中解决,直接在场景中生成未保存的object不再产生报错,感谢官方神速修复!

このバグはV 1.1.1で解決されており、シーンに保存されていないobjectを直接生成してもエラーは発生しません。公式の迅速な修正に感謝します!

This bug has been resolved in V1.1.1, and generating unsaved objects directly in the scene no longer generates errors. Thank you for the official quick fix!

1 个赞