adssencee

Showing posts with label unity game engine. Show all posts
Showing posts with label unity game engine. Show all posts

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.














Saturday, April 4, 2020

Android Game Development unity How to make It ?

Android Game Development unity How to make It?

                                                                                                               (writen by 
                                                                                                                               gour hari ghosh)


Hello, friends this content you Learn android game development for unity. many game development

unity game engine.App agar unity game engine Android Game banna chata ho to. sayhi website ma 

ho. unity game engine miliaya  android bBannya ja ta ha. Dosto unity game engine hi Aysa game 

engine ha jo Admb ka Ads support kar ha dosto.PlayStore may Apko thousand of game mil jia ga 

dosto.unity game engine ma agare apko game banna na shik na ha to phyla Apko coading Ayana 

Chia. App Agar unity game engine ma game ko create Kar Na Chata Ha to Apko C sharp Matlab

c# languge Ayana chia but Agar upkoybhi programing languge Janta ho to Apka li Asan ho ga

unity game engine game ko create kar na.



unity Android games:


Kay App unity Android games banna na cha ta ho ?  Toa Phyla  Apko unity game engine download 

kar na para ga dosto. App Unity game Engine ka Oficial Website Ka Under Maya Jia Or Download 

kar lia ja ga dost unity personal unity game engines Ka Upor Upko ClickKar Na Ha Dosto or unity game engine 2018.1bf Ko download kar la Na.
Ha ish ka ho ga ka app Animated tile map set kar sak ta ho dosto.unity game engine installer ka under
Android build support ko select kar Na Ha .is ka ho ga ka up Android game Bana paynga dosto.

Ush ka Bad Aapko kar Na Ha ka unity game engine project Create kar li ja project ka name aap kuch

vi de dak ta ho dosto. Isa pha ma appko 2d unity game ka bara ma batun ga dost.project types 2d

select kar Na Ha. Thik dosto Maya apko batun ka  app kay sa 2d unity game banasak to phyla app ish

 assets ko download kar li ja click here download Ush ka bad dosto App Create  ki  unity game

engine ka under projet jisa Image diahua ha

Usk ka Bad issh Assets ko drag kar unity 2d Game engine project ka assets ka under chor dija. Apka

assets ko import kar la ga unity game engine.ush ka Bad app main Camera ka nich app idel bale

image ka ko chor dija Ga to camera ka pase ma aya ja ga. App ka cherater. Dosto Iss Image ka Under

jaysa baysa ki ja ga.

unity game engine ka under Inspector ka Add component search ki ja rigidbody2d or Constraints

Freeze Rotation Z tick kar di ja. usk ka bad Add component sa Capsul collider 2d  ka li ja. Or Capsul

kop wdit kar li ja ga dosto uppor ma jis tarika sa dia hua ha. ush ka bad tile ko drag kar ka chore di

ja. or Inspector ka under draw mode ma tiled set kar li ja. unity game engine Inspectior ka under

Add component box collider 2d ko li ja. Or ush ko Tiled ka under edit kar jia. app unity game engine

character select kar li ja dosto or unity game engine Inspector ka Add component ka Add new script

la li ja or ushka name Aap rakh li ja playerController. unity game engine ka Inspectior ka under

player controller script ko duble click kar ka Open kar li Visual studio ya mono devloper ma.




Unity Game Engine ka Under 2d character Movement setup:-

Abb Dosto player controller Script ko open ka up mono developer ya visual studio ma  kar li ja. 

Jish ka Image ka under deua hua ha, 


                                          

public class PLAYER : MonoBehaviour  ish pa Dosato  unity game engine ka player ka class and

public class playerController : MonoBehaviour

// ish ka uder player ka VARIVAL Or class likha jata ha.
{
    private Rigidbody2D playerbody; //private ka Matlab ea AAP ka unity game engine ma show                                                                         nahie
                                                              kara ga player body jo likha  ha bho aap ka player controler
    public float speed;                          //public ka Matlab aap ka unity game engine ka un  der show
                                                              kara ga float ka matlap upka player ka speed
                                         
    public bool IslookLeft;                   // ihapa app jo bool lia hua ha aap ka true or false set kara ga.
    // Start is called before the first frame update
    void Start()                                      // void start ka under aap ka player ka component select kia jata                                                                  ha
    {
        playerbody = GetComponent<Rigidbody2D>();
    }

    // Update is called once per frame
    void Update()
   {
        float h = Input.GetAxisRaw("Horizontal"); // ihapa float h ka matlab horizontal speed  ha
        playerbody.velocity = new Vector2(h * speed, playerbody.velocity.y);
        if (h > 0 && IslookLeft == true)
        {Flip();
        }
        else if (h < 0 && IslookLeft == false)
        {Flip();
        }
       
    }

    void Flip()
    {
        IslookLeft = !IslookLeft;
        float x = transform.localScale.x *-1;

        transform.localScale = new Vector3 (x,transform.localScale.y,transform.localScale.z);

    }
}

dosto ish code ko AAP Agar app Apna player controller script ka under paste kar denga to App ka

script kam karla ga . eha pa jo script ha bho unity game engine ma player Arrow key left And Arrow

key right presse kar na sa character Movement kara ga or flip ho ja.


unity game engine  2D character jump setup:-

Hello, friend, this Content jump setup fist go to your unity game engine .fist player ko select 

kar ka Right Mouse Click kar li ja create game Object kar li ja. Or ush ka name da deja groundCheck

ush ka bad Arow sa drag karka pointer ko player ka nicha kar lik ja. jaysa ki 'Image dea hua ha.


us ka bad tile ka Select Kar ka Inspector ka niche tag section ka under create tag ki ja Or us ka name

di ja ground . unity game game engine ka under tile ka tag ground select kar li ja. Us ka bad unity

game-engine ma Inspector layer tile ka layer create ki ja .layer ka name ground da di ja.layer ko

select kar li ja ground .unity game engine ma player ko select kar ka player Controler Script ka

under duble click kar ka open kar li ja visual studio or mono developer jo vhi ha aap ka pase ma.

jays ki I?mahge ma dia huua  ha.