| | 1 | | using System.Collections; |
| | 2 | | using System.Collections.Generic; |
| | 3 | | using UnityEditor; |
| | 4 | | using UnityEngine; |
| | 5 | |
|
| | 6 | | namespace DCL.Skybox |
| | 7 | | { |
| | 8 | | public static class RenderSatellite3DLayer |
| | 9 | | { |
| | 10 | | public static void RenderLayer(ref float timeOfTheDay, EditorToolMeasurements toolSize, Config3DSatellite config |
| | 11 | | { |
| | 12 | |
|
| | 13 | | // name In Editor |
| 0 | 14 | | EditorGUILayout.BeginHorizontal(); |
| 0 | 15 | | EditorGUILayout.LabelField(SkyboxEditorLiterals.Layers.layerName, GUILayout.Width(150), GUILayout.ExpandWidt |
| 0 | 16 | | config.nameInEditor = EditorGUILayout.TextField(config.nameInEditor, GUILayout.Width(200), GUILayout.ExpandW |
| 0 | 17 | | EditorGUILayout.EndHorizontal(); |
| | 18 | |
|
| 0 | 19 | | EditorGUILayout.Separator(); |
| | 20 | |
|
| | 21 | | // Time Span |
| 0 | 22 | | RenderSimpleValues.RenderSepratedFloatFields(SkyboxEditorLiterals.LayerProperties.timeSpan, SkyboxEditorLite |
| 0 | 23 | | SkyboxEditorUtils.ClampToDayTime(ref config.timeSpanStart); |
| 0 | 24 | | SkyboxEditorUtils.ClampToDayTime(ref config.timeSpanEnd); |
| | 25 | |
|
| | 26 | | // Fading |
| 0 | 27 | | RenderSimpleValues.RenderSepratedFloatFields(SkyboxEditorLiterals.LayerProperties.fade, SkyboxEditorLiterals |
| | 28 | |
|
| 0 | 29 | | RenderSimpleValues.RenderPrefabInput(SkyboxEditorLiterals.Satellite3D.PREFAB, ref config.satellite); |
| 0 | 30 | | RenderSimpleValues.RenderFloatField(SkyboxEditorLiterals.Satellite3D.SIZE, ref config.satelliteSize); |
| 0 | 31 | | RenderSimpleValues.RenderFloatField(SkyboxEditorLiterals.Satellite3D.RADIUS, ref config.radius); |
| 0 | 32 | | RenderSimpleValues.RenderFloatField(SkyboxEditorLiterals.Satellite3D.Y_OFFSET, ref config.orbitYOffset); |
| 0 | 33 | | RenderSimpleValues.RenderFloatFieldAsSlider(SkyboxEditorLiterals.Satellite3D.INITIAL_POS, ref config.initial |
| 0 | 34 | | RenderSimpleValues.RenderFloatFieldAsSlider(SkyboxEditorLiterals.Satellite3D.HORIZON_PLANE, ref config.horiz |
| 0 | 35 | | RenderSimpleValues.RenderFloatFieldAsSlider(SkyboxEditorLiterals.Satellite3D.INCLINATION, ref config.inclina |
| 0 | 36 | | RenderSimpleValues.RenderFloatField(SkyboxEditorLiterals.LayerProperties.speed, ref config.movementSpeed); |
| 0 | 37 | | RenderSimpleValues.RenderEnumPopup(SkyboxEditorLiterals.Satellite3D.ROTATION_TYPE, ref config.satelliteRotat |
| | 38 | |
|
| | 39 | | // If fixed rotation |
| 0 | 40 | | if (config.satelliteRotation == RotationType.Fixed) |
| | 41 | | { |
| 0 | 42 | | RenderSimpleValues.RenderVector3Field("Rotation", ref config.fixedRotation); |
| 0 | 43 | | } |
| 0 | 44 | | else if (config.satelliteRotation == RotationType.Rotate) |
| | 45 | | { |
| 0 | 46 | | RenderSimpleValues.RenderVector3Field("Axis", ref config.rotateAroundAxis); |
| 0 | 47 | | RenderSimpleValues.RenderFloatField("Rotation Speed", ref config.rotateSpeed); |
| | 48 | | } |
| 0 | 49 | | } |
| | 50 | | } |
| | 51 | | } |