Пример #1
0
        static void AttachTopDownScript(GameObject aCamera, Transform aTarget)
        {
            IP_TopDown_Camera cameraScript = null;

            if (aCamera)
            {
                cameraScript = aCamera.AddComponent <IP_TopDown_Camera>();
            }

            //Check to see if we have a Target and we have a script reference.
            if (cameraScript && aTarget)
            {
                cameraScript.m_Target = aTarget.transform;
            }

            Selection.activeGameObject = aCamera;
        }
Пример #2
0
 void OnEnable()
 {
     targetCamera = (IP_TopDown_Camera)target;
 }