示例#1
0
        protected void RequireCamera()
        {
            if (SgtCamera.InstanceCount == 0)
            {
                Separator();

                if (HelpButton("Your scene contains no SgtCameras", MessageType.Error, "Fix", 50.0f) == true)
                {
                    SgtHelper.ClearSelection();

                    foreach (var camera in Camera.allCameras)
                    {
                        SgtHelper.AddToSelection(camera.gameObject);

                        SgtHelper.GetOrAddComponent <SgtCamera>(camera.gameObject);
                    }
                }
            }
        }