public virtual void OnEnable() { m_SortingOrder = serializedObject.FindProperty("m_SortingOrder"); m_SortingLayerID = serializedObject.FindProperty("m_SortingLayerID"); m_DynamicOccludee = serializedObject.FindProperty("m_DynamicOccludee"); m_RenderingLayerMask = serializedObject.FindProperty("m_RenderingLayerMask"); m_RendererPriority = serializedObject.FindProperty("m_RendererPriority"); m_RayTracingMode = serializedObject.FindProperty("m_RayTracingMode"); m_RayTraceProcedural = serializedObject.FindProperty("m_RayTraceProcedural"); m_MotionVectors = serializedObject.FindProperty("m_MotionVectors"); m_SkinnedMotionVectors = serializedObject.FindProperty("m_SkinnedMotionVectors"); m_Materials = serializedObject.FindProperty("m_Materials"); m_MaterialsSize = serializedObject.FindProperty("m_Materials.Array.size"); m_ShowMaterials = new SavedBool($"{target.GetType()}.ShowMaterials", true); m_ShowProbeSettings = new SavedBool($"{target.GetType()}.ShowProbeSettings", true); m_ShowOtherSettings = new SavedBool($"{target.GetType()}.ShowOtherSettings", true); m_ShowRayTracingSettings = new SavedBool($"{target.GetType()}.ShowRayTracingSettings", true); m_Lighting = new RendererLightingSettings(serializedObject); m_Lighting.showLightingSettings = new SavedBool($"{target.GetType()}.ShowLightingSettings", true); m_Lighting.showLightmapSettings = new SavedBool($"{target.GetType()}.ShowLightmapSettings", true); m_Lighting.showBakedLightmap = new SavedBool($"{target.GetType()}.ShowBakedLightmapSettings", false); m_Lighting.showRealtimeLightmap = new SavedBool($"{target.GetType()}.ShowRealtimeLightmapSettings", false); m_Probes = new Probes(); m_Probes.Initialize(serializedObject); }