Translate

sábado, 3 de julio de 2021

SpaceFighters Package error with latests versions of unity

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 Material(Shader.Find("Legacy Shaders/Particles/Additive"));

Finally the functions should look like this:

public static void DrawLine(GameObject go ,Transform aTransform bColor colfloat width){
            LineRenderer lineRenderer = go.GetComponent<LineRenderer>();
            if (lineRenderer ==null){lineRenderer = go.AddComponent<LineRenderer>();}
            lineRenderer.material = new Material(Shader.Find("Legacy Shaders/Particles/Additive"));
            lineRenderer.SetColors(colcol);
            lineRenderer.SetWidth(width,width);
            lineRenderer.SetVertexCount(2);
            LineRenderer lineRenderer_ = go.GetComponent<LineRenderer>();
            lineRenderer_.SetPosition(0a.position);
            lineRenderer_.SetPosition(1b.position);
        }
        public static void DrawLine(GameObject go ,Vector3 aVector3 bColor colfloat width){
            LineRenderer lineRenderer = go.GetComponent<LineRenderer>();
            if (lineRenderer ==null){lineRenderer = go.AddComponent<LineRenderer>();}
            lineRenderer.material = new Material(Shader.Find("Legacy Shaders/Particles/Additive"));
            lineRenderer.SetColors(colcol);
            lineRenderer.SetWidth(width,width);
            lineRenderer.SetVertexCount(2);
            LineRenderer lineRenderer_ = go.GetComponent<LineRenderer>();
            lineRenderer_.SetPosition(0a);
            lineRenderer_.SetPosition(1b);
        }

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 CreateEnemyBullet(GameObject spawnerGameObject parentstring type,float speedx,float speedy){//type= basic
            GameObject bullet Instantiate(Resources.Load("Bullet/"+type+"Bullet"), spawner.transform.positionQuaternion.identity)as GameObject;
            bullet.name=type+"bullet";
            master.setLayer("Enemies",bullet);
            LookAt2D(bullet,GameObject.Find("Player").transform);
            bullet.GetComponent<Rigidbody2D>().AddRelativeForce(new Vector2(-speedx,speedy));
            if(parent!=null){bullet.transform.parent=parent.transform;}
        }

and change these scripts from Update() to FixedUpdate():

Scripts/Camera/Main_Controller.cs
Scripts/Enemies/ (all scripts in this folder)



 

jueves, 3 de agosto de 2017

SpaceShip Low Poly Kit (Published)

Buenos días chicos, por fin ha sido aceptado el kit:


Hoy os traigo el enlace final en Unity Asset Store:
http://u3d.as/TYF