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
- least square
- 머신러닝
- Machine learning
- 딥러닝
- struct
- regression
- inheritance
- Effective C++
- Class
- call by value
- 회귀학습
- 선형모델
- 지도학습
- MapReduce
- overriding
- call by reference
- Overloading
- c++
- kubernetes
- 맵리듀스
- local minimum
- Nonlinear Function
- 비선형모델
- virtual function
- 비선형 함수
- 회귀
- 최소제곱법
- member function
- Linear Regression
- Nonlinear Model
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 |