amera mainCamera;
public Camera guiCamera;
public GameObject prefab;
public void fire( Vector3 clickedPos_ )
{
GameObject _gameObj = Instantiate( prefab, clickedPos_, Quaternion.identity ) as GameObject;
// No mean yet, just align as child
SomeTools.AppendChildAndReset( gameObject, _gameObj );
// run floating script
FloatingT
de>
====== 객체를 멈춘 상태로 만들어 놓고, 시작할때 활성화 할때 ======
GameObject를 비활성활 상태로 만들고 필요할때 활성화할때.
* Awake()에서 <code>gameObject.SetActive(false);</code>로 비활성 상태로 만들고,
* 필요할때, <code>gameObject.SetActive(true)</code> 호출해서 활성화한다.
그리고,
* **Sta... ss example : MonoBehaviour {
void Start() {
GameObject go = GameObject.Find("SomeGuy");
go.GetCompon
자주 안쓰니 잊어버려서.
<code csharp>
LeanTween.rotate
(
gameObject, orgRotate, 1f,
new object[] { "ease", LeanTwe... ndPos.transform.position; // 이동할 좌표
HOTween.To(
gameObject.transform, // Prop()에서 position 변수를 사용할 것이기 때문에, ... 것
);
// --> HOTween에서는 변경할 객체의 속성을 이렇게 찾아낸다.
// gameObject.transform + Prop()
// --> gameObject.transform.position
// 아래 코드는 에러
HOTween.To(
gameObject, // Prop()에서 p
:unity:layout-2-3.png?400|}}
* <color orange>**GameObject » Create Other » Cube**</color> 메뉴를 선택해서 3차원 공간에 ... 확대된다.
===== 라이트 추가 =====
* 메뉴에서 <color orange>GameObject >> Create Other >> Directional Light</color> 빛 추가... **Ctrl+Alt+F**</color> 또는 \\ 메뉴에서 <color orange>**GameObject >> Move To View**</color>
= Ctrl+Shift+F : **씬 ... 대로 보여지는 위치로 카메라가 이동된다.
= : 메뉴에서 <color orange>**GameObject >> Align with View**</color>
===== 표면 접점 기능 ====
ion**의 Child 오브젝트 개수를 구한다.
= : 이동할 위치 정보를 갖고 있는 GameObject의 개수를 구한다.
= PathObjectCount : 이동 위치 정보 GameObject의 인덱스를 저장할 변수를 추가하고 초기화
==== FSM에 'Init' State 추가 ====
|... Child Count** 액션 |
| \\ **Get Child Count** 액션에서 GameObject에 **Position** 오브젝트를 할당. \\
로 붉은색으로 표시
if(rigidbody.velocity.magnitude > 1)
gameObject.renderer.material.color = impactColor;
//아니면 그냥 표시
else
gameObject.renderer.material.color = stableColor;
</code>
=
swers.unity3d.com/questions/348642/how-to-scale-a-gameobject-to-fit-within-a-rect-.html|How to scale a gameObject to fit within a Rect]]
* [[http://docs.unity3d.com/Doc