ejoy / ant

Ant game engine
MIT License
3.71k stars 372 forks source link

加载模型报错 #109

Closed constly closed 4 months ago

constly commented 4 months ago

我看 #95 这个已经完成,我更到最新尝试使用了下,加载模型时报下面的错:

[2024-02-29 21:28:53.44][ERROR]( ant.window|window )policy `ant.modifier|modifier` is not defined.
stack traceback:
        ( service:2 )
        G:/ant/ant/pkg/ant.world/policy.lua:34: in local 'import_policy'
        G:/ant/ant/pkg/ant.world/policy.lua:47: in field 'verify'
        G:/ant/ant/pkg/ant.world/main.lua:172: in upvalue 'create_entity_template'
        G:/ant/ant/pkg/ant.world/main.lua:196: in upvalue 'create_template'
        G:/ant/ant/pkg/ant.world/main.lua:225: in upvalue 'prefab_instance'
        G:/ant/ant/pkg/ant.world/main.lua:257: in method '_flush_instance_queue'
        G:/ant/ant/pkg/ant.world/entity_system.lua:71: in local 'f'
        G:/ant/ant/pkg/ant.world/main.lua:392: in upvalue 'update_func'
        G:/ant/ant/pkg/ant.world/main.lua:417: in field '_pipeline_update'
        G:/ant/ant/pkg/ant.world/main.lua:595: in method 'pipeline_update'
        G:/ant/ant/pkg/ant.window/world_instance.lua:79: in upvalue 'f'

另外,引擎部分希望少error,一般来个红色错误输出就可以了吧,目前的error相当于是宕机 = =

constly commented 4 months ago

我的加载代码是这样的:

PC:create_instance {
    prefab = "/pkg/game.res/npc/test_003/scene.gltf|mesh.prefab",
}
cloudwu commented 4 months ago

ant.modifier|modifier is not defined.

表示你没有引入必要的 feature 。

constly commented 4 months ago

噢,确实是,引入就好了