UnityEditor.ReflectionProbeEditor.OnPreSceneGUICallback C# (CSharp) Method

OnPreSceneGUICallback() private method

private OnPreSceneGUICallback ( SceneView sceneView ) : void
sceneView SceneView
return void
        private void OnPreSceneGUICallback(SceneView sceneView)
        {
            if (Event.current.type == EventType.Repaint)
            {
                foreach (Object obj2 in base.targets)
                {
                    ReflectionProbe key = (ReflectionProbe) obj2;
                    if (this.reflectiveMaterial == null)
                    {
                        break;
                    }
                    Matrix4x4 matrix = new Matrix4x4();
                    if (!this.m_CachedGizmoMaterials.ContainsKey(key))
                    {
                        this.m_CachedGizmoMaterials.Add(key, Object.Instantiate<Material>(this.reflectiveMaterial));
                    }
                    Material material = this.m_CachedGizmoMaterials[key] as Material;
                    if (material == null)
                    {
                        break;
                    }
                    float mipLevelForRendering = 0f;
                    TextureInspector cubemapEditor = this.m_CubemapEditor;
                    if (cubemapEditor != null)
                    {
                        mipLevelForRendering = cubemapEditor.GetMipLevelForRendering();
                    }
                    material.SetTexture("_MainTex", key.texture);
                    material.SetMatrix("_CubemapRotation", Matrix4x4.identity);
                    material.SetFloat("_Mip", mipLevelForRendering);
                    material.SetFloat("_Alpha", 0f);
                    material.SetFloat("_Intensity", this.GetProbeIntensity(key));
                    float x = key.transform.lossyScale.magnitude * 0.5f;
                    matrix.SetTRS(key.transform.position, Quaternion.identity, new Vector3(x, x, x));
                    Graphics.DrawMesh(sphereMesh, matrix, material, 0, SceneView.currentDrawingSceneView.camera, 0);
                }
            }
        }