Notice
Recent Posts
Recent Comments
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | ||||
4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 | 19 | 20 | 21 | 22 | 23 | 24 |
25 | 26 | 27 | 28 | 29 | 30 | 31 |
Tags
- Overloading
- 머신러닝
- c++
- inheritance
- kubernetes
- 회귀학습
- virtual function
- Class
- local minimum
- Effective C++
- Linear Regression
- MapReduce
- member function
- least square
- 최소제곱법
- Nonlinear Function
- 맵리듀스
- 회귀
- overriding
- 비선형모델
- 비선형 함수
- struct
- Machine learning
- regression
- call by reference
- Nonlinear Model
- call by value
- 선형모델
- 지도학습
- 딥러닝
Archives
- Today
- Total
J's Study log
[Unity] GetComponent 본문
There are two ways to call components in script.
First way to call a value from component by using script.
For example, 'Transform.position.z'
This means 'position of z in component Transform'.
The other way to call components you should make a new value(doesn't matter local or member) type of the component you want to call. And declare the value equal GetComponent<typeOfComponent>(). Now the value can be called in function to call the component.
By using both ways well, you can make what you want like this.
If the condition of the object's Rigidbody is like this
The result is...
'Computer Language > Unity' 카테고리의 다른 글
[Unity] Input Arrow Keys (0) | 2019.02.25 |
---|---|
[Unity] Camera Work (0) | 2019.02.25 |
[Unity] Script (0) | 2019.02.23 |
[Unity] Physics Material (0) | 2019.02.21 |
[Unity] Component (0) | 2019.02.19 |
Comments