示例#1
0
        static PlanarReflectionProbeUI()
        {
            //copy HDProbe UI
            int max = HDProbeUI.Inspector.Length;

#pragma warning disable 618 //CED
            Inspector = new CED.IDrawer[max];
#pragma warning disable 618
            for (int i = 0; i < max; ++i)
            {
                Inspector[i] = HDProbeUI.Inspector[i];
            }

            //forbid other mode than realtime at the moment
            Inspector[1] = SectionPrimarySettings;      //lock realtime/Custom/bake on realtime
            Inspector[Inspector.Length - 1] = CED.noop; //hide bake button

            //override SectionInfluenceVolume to remove normals settings
            Inspector[3] = CED.FoldoutGroup(
                InfluenceVolumeUI.influenceVolumeHeader,
                Expandable.InfluenceVolume,
                k_ExpandedState,
                CED.Select(
                    (s, d, o) => s.influenceVolume,
                    (s, d, o) => d.influenceVolume,
                    InfluenceVolumeUI.InnerInspector(UnityEngine.Experimental.Rendering.HDPipeline.ReflectionProbeType.PlanarReflection)
                    )
                );
        }