jongallant / unity-bullet-hell Goto Github PK
View Code? Open in Web Editor NEWAn extremely efficient projectile generator for unity.
License: MIT License
An extremely efficient projectile generator for unity.
License: MIT License
I created an empty game object, attached the shape emitter script and added a shape to the shape template field but no projectiles spawn? The console says the method Update Projectiles is not implemented.
Any help?
This is a new function I suggest.I'm making a Editor of a bullet hell game,I need to pause the bullets when I press a button and resume when I press it again.
If you have free time,can you tell me have to make it.
Thanks so much
This is awesome work! But I haven't figured out how to use the shape one. I tried:
protected override void UpdateProjectiles(float tick)
{
throw new System.NotImplementedException();
}
I can't find a way to change the appearance of the projectile. Even if I set the texture to a square, it shows as a circle.
When trying to build the project I got the error "EditorPrefs" does not exist in the current context. I commented it and the references in the EditorOverride script. Once the executable is ready, the bullets nor the bullet counter seem to appear. Is it related?
If so, how do I fix the ""EditorPrefs" does not exist in the current context" (Bullets and counter still appear in the editor).
Opened in Unity 2019.1.13f1, loaded the two sample scenes and neither showed any bullets.
The bullet count did increase though. Projectile prefab wasn't present in the projectile slot on one emitter. Added it, but to no avail.
Maybe it's a shader issue? I have an older graphics card (8800GT)
It works perfectly in unity, but when I tried to build the SampleScene in either windows or webgl, the bullets do not load and this is the error message I got:
ArgumentNullException: Value cannot be null.
Parameter name: shader
ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
NullReferenceException: Object reference not set to an instance of an object
I'm using Unity 2020.3.0f1, I'm on the latest master. I tried to turn off Enable GPU instancing in materials but it makes no difference.
I'm currently working on a project that has the following conditions:
Every time I switch a weapon, and therefore a new Emitter is created, I get a weird Overflow Exception in IndirectRenderer class.
I did some dive into the code, and the issue seems to happen because the previous emitter, will pass all the assigned projectiles + 1 to the new emitter active projectiles.
This results in 50001 which overflows the TransformBuffer in the Draw method for IndirectRenderer.
Here's what I'm doing every time I equip a new weapon:
// I set emitter prefab from the editor.
// emitterPosition is also set in editor, and it's an empty transform containing the position where I want the emitter to be.
GameObject emitter = Instantiate(emitterPrefab, emitterPosition);
// Add the emitter to the Projectile Manager.
ProjectileManager.Instance.AddEmitter(emitter.GetComponent<ProjectileEmitterAdvanced>(), 100);
// Register this emitter.
ProjectileManager.Instance.RegisterEmitter(emitter.GetComponent<ProjectileEmitterAdvanced>());
I tried fixing the bug, but I still need to familiarize a little more with the process.
I'd be happy to help out fixing it, but I'd like to know first your insight on what is going on, and how I Could handle multiple dynamic emitter instantiations or, in other words, emitters attached to equipped weapons aligned to their lyfecycle.
I tried with two different prefabs, and the bug was gone.
I think I'm ok with creating a new emitter per weapon, I don't think this is a bug anymore.
Thanks for this awesome lib !
Wow, I was so excited by seeing the bug gone that I didn't pay attention that also the running particles that were created by the previous emitter (previous equipped weapon) will also dissapear when I switch weapons.
So this is no longer the bug I created for this issue, but I'd love some insight on this issue, and what would you recommend doing.
I was able to make it work. I had to do some trickery.. For instance, I had to implement a class that handles the recycling of these emitters, if a weapon is equipped that needs an emitter that has been instantiated before, we return the instance of the emitter instead.
Before destroying the equipped weapon, I had to unattach this emitter from it to avoid it being destroyed.
This seems to make everything work as expected. Just one quick question for you: Do you think this implementation is the right one? Is there anything you'd recommend for dynamic usage of emitters?
I am making a bullet hell game based on this, but i can't find anything to make it collide with my player. How can i attach a collider to the bullet?
I've been trying a bunch of different things and i'm falling short every time. Is it possible to somehow change the sorting layer? I'm using tilemaps and so the bullets are spawning "behind" the tilemaps..
I'm having an issue that I haven't narrowed down completely..
But it seems like when a bullet hits an edge, maybe the player collider or a tilemap corner collider.. the bullets kind of freeze and just flicker over and over again until I go out of frame and it resets.
I'm using Unity 2020.3.15f2. If I don't add the shaders to the project settings, it will throw errors like this. And the projectiles won't display.
ArgumentNullException: Value cannot be null.
Parameter name: shader
After I added the shaders like this, it didn't have errors but the projectiles weren't displaying. The projectile number wasn't showing, too.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.