Пример #1
0
        private static void DisplayTimelapseData(Timelapse timelapse)
        {
            if (timelapse == null)
            {
                EditorGUILayout.LabelField(new GUIContent("No Timelapse Active"), GUI.skin.box, GUILayout.ExpandWidth(true), GUILayout.Height(32));
                return;
            }
            if (timelapse.TimeRemaining.Second == 0)
            {
                EditorGUILayout.LabelField(new GUIContent("Timelapse Has Finished"), GUI.skin.box, GUILayout.ExpandWidth(true), GUILayout.Height(32));

                EditorGUILayout.LabelField(new GUIContent(timelapse.ShootsTaken.ToString("Total Pictures Taken : 0")),
                                           GUI.skin.box,
                                           GUILayout.ExpandWidth(true),
                                           GUILayout.Height(32));

                return;
            }

            EditorGUILayout.LabelField(new GUIContent(string.Format("Seconds Left: {0}", timelapse.TimeRemaining.Second)),
                                       GUI.skin.box,
                                       GUILayout.ExpandWidth(true),
                                       GUILayout.Height(32));
            EditorGUILayout.LabelField(new GUIContent(timelapse.ShootsTaken.ToString("Pictures Taken : 0")),
                                       GUI.skin.box,
                                       GUILayout.ExpandWidth(true),
                                       GUILayout.Height(32));
        }
Пример #2
0
        private void TakeScreenShot()
        {
            var args = new ScreenShotArgs {
                FrameWidth = HighResWidth, FrameHeight = HighResHeight, Path = path, ClearBackground = isTransparent
            };

            if (myCamera == null)
            {
                myCamera = Camera.main;
            }
            if (myCamera == null)
            {
                myCamera = Object.FindObjectOfType <Camera>();
            }

            args.Cam = myCamera;

            Timelapse = new Timelapse(waitTime, times, args.GetScaledArg(scale));
        }