-
Notifications
You must be signed in to change notification settings - Fork 77
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No idea why I can't get the basic 2d example working in my project #338
Comments
@goodiesohhi thanks for the report, can you please try the example straight from the repo without modifying it? And if you can't repro that way, try applying any change to the 2d example directly (instead of the other way around). If you can get me a repro that way it would be a lot easier for me to investigate. Thanks! |
I really can't seem to repro outside of my own project. And I can't seem to find anything that could conflict. Any ideas what could possibly cause this? The same code inside my project fails but works in the examples, everything to do with hanabi and cameras I've tried in both the hanabi examples and in my proj and it only fails on my proj. |
There's nothing obviously wrong with that. But are you sure you're keeping the effect assets alive? I don't remember if Hanabi keep them for you, chances are it doesn't (to prevent cycling dependency and blocking asset unloading, in case that'd be desired). |
how do you "keep assets alive"? I assumed adding the effect to the ResMut<Assets> was enough |
No, adding the effect to |
Okay but I am cloning the handle and adding it into a hashmap wrapped as a resource in bevy that should do the trick and this shouldn't be the issue right? |
Having similar issue with bevy 0.13, bevy_hanabi 0.11 + features 2d when added to the existing project;
Any chance this is caused by multi-camera setup or added custom graphs? |
Well, this is awkward. So it turns out actual example particles do work. Its just particles are not visible enough. Bumped speed and lifetime size to something like 5.0 and its at least in visible range. Also, I've added dbg to the pipeline state, and it seems to be in Creating state upon first access.
|
Hi @VergilUa,
I don't understand why you don't see the particles, there's a screenshot in the
I have no idea what that means. Is that a |
I just copy&pasted the example into the existing project. Scene scale is about 10x larger, different camera settings, bright background, and a post fx layered on top. So yeah. It happens.
That is a dbg! from the pipeline state [CachedPipelineState] for the case above.
Pipelines aren't created instantly, and since there's more than one graph being created at the same time - it seems to take more than a frame to do so. Error goes away after a frame. Probably worth checking for the state. |
Ok makes sense. So the feedback here would be to maybe use an orthographic camera which is closer in size to the window resolution, as that's more common than the current one used in the
Ok that matches my gut feeling that the pipeline is sometimes not ready depending on the particular backend and GPU used. I think we're in agreement here. If so though, this means the error is only transient, and things eventually work, correct? Because I think in @goodiesohhi's case nothing renders ever, so it's not just that the pipeline is being compiled by the driver and needs more time, it looks a lot more serious. |
It depends on the project. But generally speaking, increasing size of the particles should be enough. I'm using something like:
Yep. |
Basically copy and pasted the 2d example but with a render layer added on spawn (saw in the multicam example that was supported?)
Is there something I'm missing? All I'm trying to do is to just spawn the 2d example in my own project (the example works properly obviously when run as an example). I'm really struggling to figure this out I have no idea what I'm doing wrong, there doesn't seem to be enough moving parts to actually go wrong. I've literally just copy and pasted the 2d example and I can't seem to get it working. IDK what to supply for further assistance as it's literally just the example.
The text was updated successfully, but these errors were encountered: