I have tested on 2020.3.13f1, exists a problem with the shader but it is easy to fix it:
Go to Vortex/VortexLib and change the Shader.Find from (""Particles/Additive"") to this:
lineRenderer.material = new Ma terial(Shader.Find("Legacy Shaders/Particles/Additive"));
Finally the functions should look like this:
public static void DrawLine(Ga meObject go ,Transform a, Tran sform b, Color col, float widt h){
LineRenderer lineR enderer = go.GetComponent<Line Renderer>();
if (lineRenderer = =null){lineRenderer = go.AddCo mponent<LineRenderer>();}
lineRenderer.mater ial = new Material(Shader.Find ("Legacy Shaders/Particles/ Additive"));
lineRenderer.SetCo lors(col, col);
lineRenderer.SetWi dth(width,width);
lineRenderer.SetVe rtexCount(2);
LineRenderer lineR enderer_ = go.GetComponent<Lin eRenderer>();
lineRenderer_.SetP osition(0, a.position);
lineRenderer_.SetP osition(1, b.position);
}
public static void Dra wLine(GameObject go ,Vector3 a , Vector3 b, Color col, float width){
LineRenderer lineR enderer = go.GetComponent<Line Renderer>();
if (lineRenderer = =null){lineRenderer = go.AddCo mponent<LineRenderer>();}
lineRenderer.mater ial = new Material(Shader.Find ("Legacy Shaders/Particles/ Additive"));
lineRenderer.SetCo lors(col, col);
lineRenderer.SetWi dth(width,width);
lineRenderer.SetVe rtexCount(2);
LineRenderer lineR enderer_ = go.GetComponent<Lin eRenderer>();
lineRenderer_.SetP osition(0, a);
lineRenderer_.SetP osition(1, b);
}
I also have checked and recommend you to make some changes:
go to Scripts/Lib/SpFLib.cs go to CreateEnemyBullet function and set speedx to -speedx:
public static void CreateEnemy Bullet(GameObject spawner, Gam eObject parent, string type,fl oat speedx,float speedy){// type= basic
GameObject bullet = Instantiate(Resources.Load(" Bullet/"+type+"Bullet"), spawn er.transform.position, Quatern ion.identity)as GameObject;
bullet.name=type+" bullet";
master.setLayer(" Enemies",bullet);
LookAt2D(bullet,Ga meObject.Find("Player").transf orm);
bullet.GetComponen t<Rigidbody2D>().AddRelativeFo rce(new Vector2(-speedx,speedy ));
if(parent!=null){b ullet.transform.parent=parent. transform;}
}
and change these scripts from Update() to FixedUpdate():
Scripts/Camera/Main_ Controller.cs
Scripts/Enemies/ (all scripts in this folder)