protected override void OnInspectorGUI() { range = EditorGUILayout.FloatField(new GUIContent("Range", "Range of the raycast"), range); PlacementMode = EdGUIPlus.EnumButtonsField("Placement Mode", PlacementMode, "Pivot", "BoxCol", "BoxRend"); rotateWithSurfaceNormal = EditorGUILayout.ToggleLeft("Rotate With Surface Normal", rotateWithSurfaceNormal); useCustomLayer = EditorGUILayout.ToggleLeft("Use Custom LayerMask", useCustomLayer); if (useCustomLayer) { EditorGUI.indentLevel = 2; availableLayersNames = GetAllLayerNames(); selectedLayersNamesMask = EditorGUILayout.MaskField("Layer Mask", selectedLayersNamesMask, availableLayersNames); customLayerMask = GetSelectedLayerMask(); } }
protected override void OnInspectorGUI() { useCustomCamera = EditorGUILayout.ToggleLeft("Use Custom Camera", useCustomCamera); if (useCustomCamera) { EditorGUI.indentLevel = 2; EditorGUILayout.PropertyField(customCameraToFitProp); } EditorGUI.indentLevel = 1; applyCameraParameters = EditorGUILayout.ToggleLeft("Apply Camera Parameters", applyCameraParameters); if (EdGUIPlus.Button("Fit Camera", EditorStyles.miniButton)) { if (useCustomCamera) { PlaceCameraFromSceneView(SceneView.lastActiveSceneView, customCameraToFit, applyCameraParameters); } else { PlaceCameraFromSceneView(SceneView.lastActiveSceneView, Camera.main, applyCameraParameters); } } }