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 |
Tags
- struct
- 비선형 함수
- overriding
- member function
- Overloading
- MapReduce
- 최소제곱법
- local minimum
- regression
- Nonlinear Function
- 머신러닝
- Machine learning
- call by value
- Nonlinear Model
- c++
- call by reference
- least square
- Linear Regression
- inheritance
- 맵리듀스
- 회귀학습
- Class
- 회귀
- 선형모델
- 비선형모델
- Effective C++
- 딥러닝
- 지도학습
- kubernetes
- virtual function
Archives
- Today
- Total
J's Study log
[Unity] Prefab / Class Inheritance 본문
Prefab
Prefab is a file of an object which is not materialized in game, but you can use it by script, such as 'public GameObject stone;'.
To make a Prefab you have to drag an object from Hierarchy View to Game View.
Class Inheritance
If you write another class name instead of MonoBehaviour the class inheritates the other.
For example,
public class B : A {
}
In this code class B inherits class A. And when you inherits class B to class A, class B also follows parents class A's code, such as if statement and so on.
When you want to call a function from A to B, use base.functionFromA().
But the function you call from parent class must be allowed to be called by protected void functionA().
'Computer Language > Unity' 카테고리의 다른 글
[Unity] Time.deltaTime (0) | 2019.03.06 |
---|---|
[Unity] UI (0) | 2019.03.06 |
[Unity] Pubilc (0) | 2019.03.06 |
[Unity] Tag / Applied Learning(Eating Coins, Game Manager) (0) | 2019.03.04 |
[Unity] Trigger and Collision (0) | 2019.03.02 |