public override void OnEnable() { base.OnEnable(); m_Materials = serializedObject.FindProperty("m_Materials"); m_BlendShapeWeights = serializedObject.FindProperty("m_BlendShapeWeights"); m_AABB = serializedObject.FindProperty("m_AABB"); m_DirtyAABB = serializedObject.FindProperty("m_DirtyAABB"); m_BoundsHandle.SetColor(Handles.s_BoundingBoxHandleColor); InitializeProbeFields(); InitializeLightingFields(); List <string> excludedProperties = new List <string>(); excludedProperties.AddRange(new[] { "m_CastShadows", "m_ReceiveShadows", "m_MotionVectors", "m_Materials", "m_BlendShapeWeights", "m_AABB", "m_LightmapParameters", "m_DynamicOccludee" }); excludedProperties.AddRange(Probes.GetFieldsStringArray()); m_ExcludedProperties = excludedProperties.ToArray(); }
public override void OnEnable() { base.OnEnable(); List <string> excludedProperties = new List <string>(); excludedProperties.Add("m_Parameters"); excludedProperties.AddRange(Probes.GetFieldsStringArray()); if (!SupportedRenderingFeatures.active.rendererSupportsMotionVectors) { excludedProperties.Add("m_MotionVectors"); } if (!SupportedRenderingFeatures.active.rendererSupportsReceiveShadows) { excludedProperties.Add("m_ReceiveShadows"); } excludedProperties.Add("m_RenderingLayerMask"); m_ExcludedProperties = excludedProperties.ToArray(); m_CurveEditor.OnEnable(serializedObject); m_ColorGradient = serializedObject.FindProperty("m_Parameters.colorGradient"); m_NumCornerVertices = serializedObject.FindProperty("m_Parameters.numCornerVertices"); m_NumCapVertices = serializedObject.FindProperty("m_Parameters.numCapVertices"); m_Alignment = serializedObject.FindProperty("m_Parameters.alignment"); m_TextureMode = serializedObject.FindProperty("m_Parameters.textureMode"); m_GenerateLightingData = serializedObject.FindProperty("m_Parameters.generateLightingData"); InitializeProbeFields(); }
public override void OnEnable() { base.OnEnable(); m_PointEditor = new LineRendererEditor(target as LineRenderer, this); m_PointEditor.Deselect(); SceneView.onSceneGUIDelegate += OnSceneGUIDelegate; Undo.undoRedoPerformed += UndoRedoPerformed; EditMode.onEditModeStartDelegate += EditModeStarted; EditMode.onEditModeEndDelegate += EditModeEnded; List <string> excludedProperties = new List <string>(); excludedProperties.Add("m_Loop"); excludedProperties.Add("m_Parameters"); excludedProperties.Add("m_Positions"); excludedProperties.AddRange(Probes.GetFieldsStringArray()); if (!SupportedRenderingFeatures.active.rendererSupportsMotionVectors) { excludedProperties.Add("m_MotionVectors"); } if (!SupportedRenderingFeatures.active.rendererSupportsReceiveShadows) { excludedProperties.Add("m_ReceiveShadows"); } excludedProperties.Add("m_RenderingLayerMask"); m_ExcludedProperties = excludedProperties.ToArray(); m_CurveEditor.OnEnable(serializedObject); m_Loop = serializedObject.FindProperty("m_Loop"); m_Positions = serializedObject.FindProperty("m_Positions"); m_PositionsSize = serializedObject.FindProperty("m_Positions.Array.size"); m_ColorGradient = serializedObject.FindProperty("m_Parameters.colorGradient"); m_NumCornerVertices = serializedObject.FindProperty("m_Parameters.numCornerVertices"); m_NumCapVertices = serializedObject.FindProperty("m_Parameters.numCapVertices"); m_Alignment = serializedObject.FindProperty("m_Parameters.alignment"); m_TextureMode = serializedObject.FindProperty("m_Parameters.textureMode"); m_GenerateLightingData = serializedObject.FindProperty("m_Parameters.generateLightingData"); m_ShadowBias = serializedObject.FindProperty("m_Parameters.shadowBias"); m_PositionsView = new LineRendererPositionsView(m_Positions); m_PositionsView.selectionChangedCallback += PositionsViewSelectionChanged; m_ShowPositionsAnimation = new AnimBool(false, Repaint) { value = m_Positions.isExpanded }; EditorApplication.contextualPropertyMenu += OnPropertyContextMenu; // We cannot access isEditingMultipleObjects when drawing the SceneView so we need to cache it here for later use. m_IsMultiEditing = serializedObject.isEditingMultipleObjects; InitializeProbeFields(); }
public override void OnEnable() { base.OnEnable(); InitializeProbeFields(); List <string> excludedProperties = new List <string>(); excludedProperties.AddRange(new[] { "m_Materials", "m_LightmapParameters" }); excludedProperties.AddRange(Probes.GetFieldsStringArray()); m_ExcludedProperties = excludedProperties.ToArray(); }
public override void OnEnable() { base.OnEnable(); InitializeProbeFields(); List <string> excludedProperties = new List <string>(); if (!SupportedRenderingFeatures.active.rendererSupportsMotionVectors) { excludedProperties.Add("m_MotionVectors"); } if (!SupportedRenderingFeatures.active.rendererSupportsReceiveShadows) { excludedProperties.Add("m_ReceiveShadows"); } excludedProperties.AddRange(Probes.GetFieldsStringArray()); m_ExcludedProperties = excludedProperties.ToArray(); }