19. Unity Scaling GameObjects and Changing Size  - Unity C# Scripting Tutorial

19. Unity Scaling GameObjects and Changing Size - Unity C# Scripting Tutorial

Charger Games

8 лет назад

88,250 Просмотров

Watch All C# Tutorials Here: http://bit.ly/2wGacFB
Build 10 Games & Apps With Unity & C#: http://bit.ly/2kzmc6R
|------------- ( Click On Show More ) ---------------- |

1. Build 7 2D & 3D Games With Unity: http://bit.ly/2la4WCa
2. Create Full games with Unity + Monetize & Publish: http://bit.ly/1QWI7zq
3. Create Candy Crush,Angry Birds,Spring Ninja BasketBall: http://bit.ly/1QuRg07

| -------------------------------------------------------------------- |

List of Best C# Scripting Books:
1. International: http://amzn.to/2yb3aaC
2. For Indians: http://amzn.to/2eL5iRr

| -------------------------------------------------------------------- |

Best Unity C# Scripting Courses:
1. Learn C# Building Games: http://bit.ly/2w7bpC0
2. Advaced C# Scripting: http://bit.ly/2eLkIVT

| -------------------------------------------------------------------- |

Get 17000+ Premium Video Courses(Free): http://skl.sh/2rxHUaR

| -------------------------------------------------------------------- |

You Can Donate Here:
1. Paypal: https://www.paypal.me/RajaBiswas
2. For Indians: https://www.instamojo.com/@rbsupercool/

| -------------------------------------------------------------------- |

List Of Gears I Use:
1. Mic: http://amzn.to/2fmWJJO
2. Webcam: http://amzn.to/2juJuLz
3. Router: http://amzn.to/2xOJkl7
4. Headphone: http://amzn.to/2fnsceJ

4. Get More Views On Youtube With This Tool: http://bit.ly/2fm6Tdl

| -------------------------------------------------------------------- |

List Of My Youtube Tutorials:
1. C# Scripting Tutorial: http://bit.ly/2wGacFB
2. Android Game Development Tutorial: http://bit.ly/2q8gAPv
3. 2D Racing Game Tutorial: http://bit.ly/2f6JwHo
4. 2D Brick Breaker Game Tutorial: http://bit.ly/1NCvcBy

| -------------------------------------------------------------------- |


Video Description:
Welcome to Unity3D C# scripting tutorial series. In this series you will learn how program in C# in unity to create awesome games. Writing scripts is one of the most important process of creating games in unity3d game engine. If you learn C# from ground up , you can create amazing games in unity. C# coding gives you a lot of control over unity, which you can use to do whatever you want in your game. If you are starting with unity game development scripting, you should start learning C# instead of javascript. C# allows you to write scripts for unity in a more organised way, which would help you to understand your game code later. If you want to be a game programmer then Unity and C# is a great way to start learning about various game development principles. Unity is a full fledged game engine, you can do anything you want, and when you have the power of C# in it, you can achieve anything easily. You can write more robust, readable, faster executable code for unity game development. You may have seen that Unity official tutorials also use C#, since it's better to write code in C# than javascript. javascript is a more free form language, it gives you more freedom which is not that good in long run. If you want to write better code for unity game development, then you should write your code in unity with C#. C# is a great language developed by microsoft for it's .net platform, and unity uses it as a scripting language.

Thanks a lot for watching this video, if you have any questions, write those in comments. I hope you enjoyed. Please subscribe and like , comment , share.

Тэги:

#Unity3D #Unity_(Software) #Software_(Industry) #Tutorial_(Media_Genre) #C#_(Programming_Language) #Scripting_Language_(Software_Genre)
Ссылки и html тэги не поддерживаются


Комментарии:

Selim Atasever
Selim Atasever - 31.01.2023 23:19

wtf is this tutorial trying to achieve?...

Ответить
GAMOE
GAMOE - 09.08.2022 14:00

thanks you

Ответить
M.R.V.N
M.R.V.N - 26.04.2022 22:57

Really helped thank you, I have found a way to enlarge the object from all axis rather than just along the X

using System.Collections;
using UnityEngine;

public class Enlarge : MonoBehaviour
{
public float speed = 5f;
Vector3 temp;
void Start()
{

}


void Update()
{
temp = transform.localScale;

temp.x += Time.deltaTime;

temp.y += Time.deltaTime;

temp.z += Time.deltaTime;

transform.localScale = temp;
}
}

Ответить
ashman 2165
ashman 2165 - 11.12.2021 00:35

is there a way to slow down the growing time? sorry im new to coding

Ответить
Fernando Peña
Fernando Peña - 04.11.2021 01:40

nice

Ответить
Brownie The Game Designer
Brownie The Game Designer - 22.06.2021 14:32

Sir please tell me, how can I make script, when 2 object collide with each other and size is increase and decrease...

Ответить
Nick
Nick - 25.05.2021 10:21

ace thank you saw this great

Ответить
CiRaz
CiRaz - 07.03.2021 22:43

How to add a point where you want your object to stop growing?
I am a newbie, so I could use help please.
Thank you for taking your time to read the comment and thx in advance for the help :)

Ответить
old art account
old art account - 19.02.2021 17:34

I usually don't comment anywhere, but this video just saved my ass, THANK YOU very much! It's adressing exactly the problem I faced and couldn't find a solution for, and it's easy to follow and to the point. Great work!

Ответить
PurpleWarrior 18
PurpleWarrior 18 - 03.01.2021 16:19

Thank you sir, I struggled for a long time until i found this

Ответить
H H
H H - 21.09.2020 09:41

Indian accent, check.
Weird audio, check.
Good tutorial, check.

Ответить
Parlerler
Parlerler - 15.07.2020 19:49

quick question. how do i make it stop scaling at a certain number?

Ответить
Sandy
Sandy - 02.07.2020 12:02

U helped me a lot
Thankx Dude

Ответить
Boyd Hamilton
Boyd Hamilton - 25.06.2020 03:27

super helpful, thanks!

Ответить
Rahul Patil
Rahul Patil - 16.07.2019 17:29

how to reset after wide obstacle position??

Ответить
Anmol Shelke
Anmol Shelke - 13.06.2019 08:56

I want to scale the object along sideways not from axis can u plz help ??

Ответить
vignesh sree
vignesh sree - 06.12.2018 10:30

Hi Raja,
Can you make a tutorial on how to Scale model from small to big size using a button in unity.For example scaling a car model to toy size to real time size by pressing a button, but it should be gradually expand not suddenly expand, how to do it.

Ответить
Aditya Rohan Singh
Aditya Rohan Singh - 16.08.2018 12:17

So we make vector3 speed a "public" variable so that it can be accessed by void update/start, right? So why do we not have to make "temp" a public variable ?

Ответить
Qwertie asdf
Qwertie asdf - 10.05.2018 21:28

simple to the point, I watched this then nailed my problem. Thanks!

Ответить
DireSloth
DireSloth - 19.03.2018 03:17

This was very useful in helping me make my character controller duck for me. Thanks!

Ответить
Supernova12034
Supernova12034 - 24.01.2018 20:02

awesome tutorial as always!

Ответить
bassleveler
bassleveler - 08.12.2017 01:01

Hello @Charger Games, Thanks for this tutorial. Have a question regarding Scaling. I have 8 cubes, I would like to scale these cubes using a UI slider. I was able to write code to control scale using slider, however the scaling is not uniform for left side objects (4 left cubes) vs right side cubes. The left scales on x axis and y axis, however the right scales on negative x and z axis! not sure why same slider does two different scaling, any help would be great.

Ответить
sorina ion
sorina ion - 19.06.2017 18:31

hello, please kindly help me: after I press "play", the cube just disappear from the screen. I put a debug.log function and the resul in the console is ok, meaning the x dimension of the cube increase with the value of "speed". But I can't figure out why the cube disappear. thank you !

Ответить
Arsh Solutions
Arsh Solutions - 18.06.2017 20:27

i want to shrink the game object so i am writing the code (temp.x -= Time.deltaTime;) but it keeps rescaling
sorry i am new to this ....i want to destroy the sphere once it comes to x=0 , y=0 ,z= 0.

Ответить
Jimbo G
Jimbo G - 12.06.2017 17:37

OMG!! Thank you sooo much! I've been trying to figure this problem out for hours!! I've read through Unity doc's and searched random msg boards and I still couldn't figure out how to randomly change the scale of my generated gameObjects. I'm coding in JS so I had to tweak your code slightly but YOU ARE A LIFESAVER!!

Ответить
Amilcar Technologies
Amilcar Technologies - 29.04.2017 16:53

very good and simple to understand video ^ ^

Ответить
Екатерина Армянинова
Екатерина Армянинова - 09.04.2017 06:42

Thank you!

Ответить
Historyan
Historyan - 25.02.2017 15:52

Hi Radja, how come between position, rotation and scale. only rotation that can access directly without use Vector3? thanks in advance :)

Ответить
Shiva Balachandran
Shiva Balachandran - 03.10.2016 06:02

This is pretty nice. It's exactly what I am looking for. I also am keen to know how do we limit the size of the object. Like say, I want the object to stop growing when it reaches a particular size. How must I achieve this?

Ответить
Xcell'N Excel
Xcell'N Excel - 12.09.2016 13:33

good stuff

Ответить
Deepak Singh
Deepak Singh - 08.09.2016 09:20

hey thanks for the video . but i want to scale the object using a ui button . how can i do that ?

Ответить
Kirtsata
Kirtsata - 03.04.2016 22:01

Hmm i want it just to change its size and then stop :\

Ответить
Bilal Sardar
Bilal Sardar - 24.01.2016 21:25

why we didn't multiply Time.deltaTime in rotation script? i thought we had to multiply it every time where we are animating an object.

Ответить
Naresh Ugaonkar
Naresh Ugaonkar - 16.12.2015 13:33

hi.. I have made a project in unity for Android I want it to scale according to the devices resolution. can u do a video on that please or if u have done it already plz give the URL. thanks.. u r Chanel is awesome keep up the good work.

Ответить
harika aakutota
harika aakutota - 30.10.2015 08:03

hi raja ji,
in this video it continuously getting scaled....but , after some scaling if i want to stop how to do ?i mean if click on the object it should zoomed.i mean i am examing the object.....if i click on the object , only that object should be visible on the screen and if i press "ESC" it should go back to normal size and position.......can u guide me pls...

Ответить
Hanumanagouda K
Hanumanagouda K - 28.10.2015 01:07

thank u for your tutorial i have a question , am creating a fps game i dono how to add a firing button and credits button on touch pad of my android phone
plz help me out this

Ответить
Aqua Studios
Aqua Studios - 24.10.2015 15:52

Hey will you continue the racing game tutorial?

Ответить
James Zhang
James Zhang - 17.10.2015 06:24

Thank you,Raja,谢谢你

Ответить
kunal joshi
kunal joshi - 13.10.2015 22:09

Thanks Raja for these videos. Just wanted to confirm if you are going to add more videos in this tutorial series ?

Ответить
jairovs2002
jairovs2002 - 11.10.2015 05:59

Thank you Raja, 8-)

Ответить