adssencee

Tuesday, May 26, 2020

how to setup load Screen for unity matlab unity ka under kaysa Manu ko setup kara


how to setup load Screen for unity or how to setup  Manu for unity


Friends aap dek pa raraha  upor ma jo Title dea hua ha kaysa unity ka under Manu ko set kia jata  ha.

Ajj bolun ga Friends  bhoat hi Easy ha unity ka under Manu create katr na. Aap Agar thora bhoat coading

kar na janta ha dosto aap, ko pata ho ek button click kar na sa dus ra Activay khul jata ha. usi tari ka sa

aap ko unity 2d game engine ka under  create new Secen kar na para ta ha or ush ka bad aap up na

display ko sajia background da de ja bhi bala. or Button create kar li ja. please Look at the Image


Jaysa Image ka under dea hua ha  game play seen.or dus ra Main manu create. phayla jo dek pa ra ha

game playseen jo ki Aap ka charater ka game play ho ga. dusra game manu jis ka under  manu create ki ji

ga matlab bacground,Button,ImageView And other features muse system And Animation play other

features. so payla friends Aap unity game engine ka under hirachy ka upor right mouse click kar ka create

Empty kar ka GameObject kar li ja. Game Object ka name dadeja MainManu. friends ush ka bad aap uniy

Asset under ka upor click kar ka create C# Scripts la li ja.ush ka name aap kuch bhi rak sak ta ho.

unity Assest ka under jo Scripts ko create ki ha. ush ko drag kar ka MainManu GameObject upor chor \

dee ja. unity ka ude jo Script ha ush ko duble click kar ka open ka li ja. visual studio ya mono developer

kisi bhi coding Software under. bellow Image ka under



Image ka under jis tari ka sa dea hua usitari ka aap ko coading kar la na ha payla Image ka jo red line

ha duble Attbut ka under aap jo game play Seen ho unity ka under usiko type kar la na ha.aapko

Asani ho iss lia maa ehapa coading ko type kar ta huuu. ish Scripts ko Aapko drag kar ka canva ka under  chor de na ha.


public void StartButom () {
        SceneManager.LoadScene("rtr"); // ush under unity ka game play seeen ko Set kar la na ha.
       
    }
   
    // Update is called once per frame
    public void Qunit () {

        Application.Quit();   // eea Quite Button ha friends aap ja Android mobile ka under jab game ko

   playe karanga  tab issbutton press kar lana sa game Close ho jiga.   
    }
}


Ab Main manu ka under jo button Create ki ha ush ka Function set kar na ha. Button ka nicha On click

fuctio aap dek pian ga friends Image ka under dekia


+ sine ka upor click kar ka function ceate  kar li ja.ush ka ba unity game engine ka Hiearachy ka uder

Canva ko drag kar ka runtime Button function under chor de ja. or next box ka under jo fuction set kar

na boo ha App Scripts ka StatButton. Same Quite button ka set kar la na ha friends ha. aapko jada

details ka lia mera youtube Channel ka video dek lija


please friends like Share Comment. thanks





















Thursday, May 21, 2020

How to setup Audio unity 2d game development?

How to setup Audio unity 2d game development



Hello, friend this me, Gour Hari Ghosh. so  I told you how to set up unity 2d game engines create Audio 

system for unity. fist create your unity game engine the First project You do not learn how to create your project please visit my 

Youtube channel Dbz shiva here you see the 2d game development tutorials here is you learn the project how to create 2d game project

setup And Camera setup unity 2d game development. how to create Andriod Button unity cross-platform 

input manager. And Other features so let's go below the Images.  



So Friends you see Red color text what are doing here. So I told you first create unity 2d game engine 

Hierarchy panel right  mouse click create Two GameObject  first name Music and the second  name is

SFX. After that go to Game control script unity game Engine Open Visual studio open the Scripts.

See the picture



 [Header("audio")] you look image this your Audio header After creating Two variables  public

AudioSource SFX clip;  public AudioSource musce; Now Save you scrips And build Script. What Are

want. Now got your unity game Engine  you See Audio header below SFX And musce  now drag you

game Object .muse to muse And SFX to SFX before muse Game Object Add Component Audio Source

Sfx GameObject AddComponet Audio Source.now go to your Visual Studio And you see the

same create player variables the  just like  public AudioClip jump clip; public AudioClip Attackclip;

public AudioClip[] footstep; then save your Game Controller Scripts. and got unity 2d game engine

you look game controller Scripts Sfx And musice below three create variables jump clip And Attack

Setup, foot setup. now dag your Asset folder your Audio clip. now unity 2d game engines Import

your Audio clip. Select your jump Audio clip and drag it the game controller variables jump clip transform

second Attack setup drags your Audio file yo game controller Attack setup transform. now See the

Image 


create your musce reference for your Audio clip just like see the Abobe Image:-   public void

plysfx(AudioClip audio, float voulim)
    {
        sfxclip.PlayOneShot(audio, voulim);

    }

This reference used for player-controlled Scrips. now look the Image player Controller jump Scripts

See the Images




this coading create first now go tour jump setup see the Image



if (CrossPlatformInputManager.GetButtonDown("Attack")&& isAtttack==false)
        {
            _Gamecontrler.plysfx(_Gamecontrler.Attackclip, 0.5f);

About the Image this variables types now go to your unity 2d game engines And play your game you

see the gameplay now press jump Button you hear your sound clip. now same pose your Attack sound

System. Foot Step Sound System So deferents  you see the Images this variables use your footstep


 public AudioClip[] footstep; now Select your character go to Animation walk And run Setup frame

who's the frame you Sound it See the Image 

+ click And function button select Footstep. now go your player controller Scripts now create new

function   void Footstem()
    {
        _Gamecontrler.plysfx(_Gamecontrler.footstep[Random.Range(0, _Gamecontrler.footstep.Length)], 0.5f);

    }
this your foot Step function After that go to your unity game engine play your game you hare your Foot

Step Sound more About Information Vist my Youtube channel Dbz shiva See the video Sound Setup for

100 % sure Working your sound  more About Information see the video




friends unity game development Other Search you see my blog please visit Oteh post.














Friday, May 8, 2020

Easy Waya Camera Setup 2D Game Development for Unity?

Hello, Friends This me Gour Hari Ghosh. Here is this Content Abobe see you Heading. I Told you

easy way setup Camera unity 2d Game development. if you learn other Setup for a unity game.

Please see the Other Content. unity Camera Setup so Easy friends. First, you learn to code. Friends C# language.

you see the unity C# coding And Create your unity 2d Game. But don't learn unity C# Coding

Remember your not a good game developer for the Unity Engine. because of A good game

developer's fist understands theUnity C# coding After that Create your Unity 2d  games.

Here Above See the unity 2d game Image, I am creating a  unity 2d game. how to create unity 2d

game Camera setting. let's talk all Details


Friends first unity 2d game engine complete your project unity 2d  character setup After that

create unity 2d game engine  GameControler Script Assets just like Above the Image. And 2d unity

 Engine Hierarchy 

Right, Mouse clicks and createempty you see the GameObject. This unity 2d GameObject right Mouse click

rename it GameControler. now drag your scrip to you GameControler GameObject. Now you unity
 2d game

See GameObject Gamecontrler transform position All  X, Y, Z value set 0 shows the Images


unity 2d game engine  Asset  Duble click GameController Script Open it you coding Editor Just

like Mono developer or visual studio. you see the coding all complete Gamecontroler Script

you see it


unity 2d Gamecontrler Scripts

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class gamecontrler : MonoBehaviour {

    public Transform playertranform,camEsc,camDir,camSub,cambas; // This your unity 2d GameCotroler
                                                                                                               Objcet tranansform all.
    private Camera cm;                    // This your unity 2d camera varibale
    public float camspeeed;                  // This your unity 2d cherater camera speed varivale

// Use this for initialization
void Start () {


        cm = Camera.main;   // here Are set Your unity 2d camer for Start

}

// Update is called once per frame
void Update () {

}

    void LateUpdate()     
    {
        float poscamX = playertranform.position.x;   // here unity 2d player tranform posin varible
        float poscamY = playertranform.position.y;

        if(cm.transform.position.x <camEsc.transform.position.x && poscamX < camEsc.transform.position.x)
        {
            poscamX = camEsc.transform.position.x;
        }
        else   if (cm.transform.position.x > camDir.transform.position.x && poscamX > camDir.transform.position.x)
            {
                poscamX = camDir.transform.position.x;
            }
        if (cm.transform.position.y < cambas.transform.position.y && poscamY < cambas.transform.position.y)
        {
            poscamY = cambas.transform.position.y;
        }
        else   if (cm.transform.position.y > camSub.transform.position.y && poscamY > camSub.transform.position.y)
        {
            poscamY = camSub.transform.position.y;
        }

        Vector3 poscam = new Vector3(poscamX, poscamY, cm.transform.position.z);

        cm.transform.position = Vector3.Lerp(cm.transform.position, poscam, camspeeed * Time.deltaTime);




    }
}

This unity C# coding You copy it and past Your unity 2d game controller Scripts, it's Working. here are  double // the

comment on coding. but unity 2d player controller Scripts some setting I past it. you see the double//

this your unity 2d gameconroler Scripts setting

player controller coding.

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

using UnityStandardAssets.CrossPlatformInput;

public class playercontroller : MonoBehaviour {


    private gamecontrler _Gamecontrler;// this your unity 2d cmera controller varivle.


    private Rigidbody2D playerb;
    public float speed, jumpforcw;
    public bool isloookleft;
    private Animator playerAnimator;
    public Transform groundchek;
    private bool isGrounded;
    private bool isAtttack;
    public GameObject prefabhitbox;
    public Transform mao;
 
// Use this for initialization
void Start () {
        playerb = GetComponent<Rigidbody2D>();
        playerAnimator = GetComponent<Animator>();

        _Gamecontrler = FindObjectOfType(typeof(gamecontrler)) as gamecontrler; //this your unity                                                                                                             2d obejct gamecontroller setting.

        _Gamecontrler.playertranform = this.transform; // this your unty 2d chereater setting.
     
     

     

     
     

}

// Update is called once per frame
void Update () {
        Movement();
        FixedUpdated();
     
}

    void Movement()
    {

        float h = CrossPlatformInputManager.GetAxis("Horizontal");
     
        playerb.velocity = new Vector2(h * speed, playerb.velocity.y);
        if (
            isAtttack == true && isGrounded==true
            )
        {
            h = 0;
        }
     

        if (h>0 && isloookleft == true)
        {
            Flip();
        }
        else if(h<0&& isloookleft == false)
        {
            Flip();
        }
        if (CrossPlatformInputManager.GetButtonDown("Jump")&&  isGrounded== true)
        {
            playerb.AddForce(new Vector2(0, jumpforcw));
        }
        if (CrossPlatformInputManager.GetButtonDown("Attack")&& isAtttack==false)
        {
            isAtttack = true;
            playerAnimator.SetTrigger("Attack");
        }
        playerAnimator.SetInteger("speed", (int) h);
        playerAnimator.SetBool("isGrounded", isGrounded);
        playerAnimator.SetFloat("speedy", playerb.velocity.y);
        playerAnimator.SetBool("isAttack", isAtttack);

     
     


    }
    void FixedUpdated()
    {
        isGrounded = Physics2D.OverlapCircle(groundchek.position,0.02f);
    }

    void Flip()
    {
        isloookleft = !isloookleft;
        float x = transform.localScale.x * -1;
        transform.localScale = new Vector3(x, transform.localScale.y, transform.localScale.z);
   }
    void EndAttack()
    {
        isAtttack = false;
    }

    void HitboxAttack()
    {
        GameObject hitboxtemp = Instantiate(prefabhitbox, mao.position, transform.localRotation);
        Destroy(hitboxtemp, 0.2f);
    }
}


unity 2d  coding you  Complete After that go to your unity 2d game engine Gamecontroler Object below

unity 2d  create  Game empty and name it camesc, copy it And three time past it And re name it  camdir,

camsub, cambas All z transform -10 see bnelow Image


you Look  Image  And the same to you do it. you play unity 2d game you look you camera move

properly.


mow  Expleane you're All camera direction Remember  I told you here are fourth camera diration


fast camera direction  camesc :- what is camesc diration ? 

camesc your player diration.  camesc  GameObeject selected And unity Move Toll drag Any whare 

camera poison begin it fast. 

second  camera direction camdir :-what is camdir diration ? 

camdir  diration are not moveing the camera. camdir GameOjet selected And unity Move toll drag

Anywhere and  you play game character  go to your camdir gameObject  drag position this time

camera  Movement not work.


 Third  camera direction camsub :-what is camsub diration ? 


camsub  diration are not moveing the camera. camsub GameOjet selected And unity Move toll drag

up the playerCherater and  you play game character  go to  jump your camsub gameObject  drag

position this time  camera  Movement not work.

Fourth camera direction cambas :-what is cambas diration ? 

cambase diraction is the Main camera diraction you selected cambase gameObject And Main

camera All  position copy And cambas gameObject transform past value After that you play

unity 2d game And position your MainCamera set.


So friends you Any problem please visit my youtube channel   dbz shiva  and see the video







please comment below the box.







Monday, May 4, 2020

How to setup unity 2d Game Development Android Button ?

How to setup unity 2d Game Development  Android Button? 

Hello, friends this me gour. so you look Above the Heading. How to setup unity 2d Game Development 

Android Button.a friend I tell you how to set up button first, create your project.
 unity 2d game development first creates your project. then go to your File and bulid Setting and select

your Android plateform swich platform. unity 2d game development engine all you project convert

Android plateform.After that you go go to Asset store download the StanderAsset And Import your

unity 2d game development engine.After that friends you Hirachay panel right Mouse click and create your

UI Button.





After that friends go to your canvas Selected & Render Mode screen Space-camera. or Selected Render camera to MainCamera.

Now Friends go to your unity 2d game Button Seleted And you see Target graphice .Here are you selected  your Sprite Button Image.  After that go to your Stander Asset folder dueble click And open it you look croseplateformInpute Open it. Then you See Scripts Floder

duble click Open it. Then you see All Scripts now you selected One Scripts name it AxiesTouchButton drag it the button . Now you see Button under Script button name leftbutton. Then Ctl+C and copy it.

Ctrl+V  past it. secendButton Name RightButton.Here are I am past the playerContrloller Scripts. After that Right button selected copy And past  and name it jumpButton. you see jumpbutton Script Axiestouchbutton

remove. and go to your Scripts folders ButtonHandlear Scripts drag your JumpButton. After that JumpButton Seleceted copy and past this Button name it AttackButton.


using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityStandardAssets.CrossPlatformInput;  // friends this Must bee one this varivale Importent.
public class playercontrole : MonoBehaviour
{
    private Rigidbody2D playerrb;
    public float speed;
    public float jump;
    public bool islookleft;
    private Animator anim;
    private bool isground;
    public Transform isgroud;


    // Use this for initialization
    void Start()
    {
        playerrb = GetComponent<Rigidbody2D>();
        anim = GetComponent<Animator>();


    }

    // Update is called once per frame
    void Update()
    {

        Movement();
        fixupdate();



    }

    void Movement()
    {
        float h = CrossPlatformInputManager.GetAxisRaw("Horizontal");  // This  your button left And right button input
        playerrb.velocity = new Vector2(h * speed, playerrb.velocity.y);     //This Horizontal name And button scripts name same it if you not  same you it your button not work
        anim.SetInteger("speed", (int)h);
        anim.SetBool("isground", isground);
        anim.SetFloat("Blend", playerrb.velocity.y);


        if (h > 0 && islookleft == true)
        {
            Flip();
        }
        else if (h < 0 && islookleft == false)
        {
            Flip();
        }
        if (CrossPlatformInputManager.GetButtonDown("Attack")) // This your Attack button

        {
            anim.SetTrigger("Attack");
        }

        if (CrossPlatformInputManager.GetButtonDown("Jump") && isground == true) // This your jump button
        {
            playerrb.AddForce(new Vector3(0, jump));

        }

    }
    void Flip()
    {
        islookleft = !islookleft;
        float x = transform.localScale.x * -1;
        transform.localScale = new Vector3(x, transform.localScale.y, transform.localScale.z);

    }

    void fixupdate()
    {
        isground = Physics2D.OverlapCircle(isgroud.position, 0.02f);
    }
}
 



now All button Scripts funsantan Seleceted:-

look look ths Image


This Image AxiestouchButton scripts Axes name Horizontal.  Axes value -1. why -1 value use . It use that your rigid charater move left side And rightButton not -1 just like Image. LeftButton After that Response

Speed 1000 or Right button Response speed same1000 After that you play you game you see it working your left And right button. now set the JumpButton go to you button HandelerSecripts you look funcane

Name - Jump. this name Scripts name same it . you do not use same name your JumpButton  not work




on click() look you  you don't see the funcation plaese click + sine noneObject seleted your jump button.Now you see no function selected you buttonHandeler and seleceted  SetupState()  After that + sine click

noneObject seleted your jump button.Now you see no function selected you buttonHandeler and seleceted  SetdownState()  Same function for use Attack button
. but name your Attack. player controller Scripts

you don't under stand plaese look my video this my you tube channel dbz shiva














so friends visit my youtube Channel see my all unity 2d game development. or subscribe my youtbe channel. pleasse any problem plasee comment.



thanks.