You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As the title says, when altering the world from the world pointer you can get from the context argument in the raw method, it yields a panic
#[derive(Resource,Reflect,LuaProxy)#[reflect(Resource, LuaProxy)]#[ derive(clone), functions[r#" #[lua(kind = "Method", raw)] fn update(&self, ctx: &Lua) -> Result<_, _> { let world = ctx.get_world(); let world = world.write(); // This is where it panics world.get_resource_mut::<SomethingElse>(); } "#]]structMyProxy{cool_thing:String}
I tried with the blocking and non blocking methods but to no avail
The text was updated successfully, but these errors were encountered:
I think it may be that the macro blocks access to the world earlier in that generated function, this may be avoidable in raw functions as they do not necessarily need access to the world
That's precisely the problem. In my game there is a Controller component, which represents what faction a piece belongs to. I put a give_money() proxy method, so I need to reference and mutate the object that represents that faction
As the title says, when altering the world from the world pointer you can get from the context argument in the raw method, it yields a panic
I tried with the blocking and non blocking methods but to no avail
The text was updated successfully, but these errors were encountered: