| | 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 RenderPlanar3DLayer |
| | 9 | | { |
| | 10 | | public static void RenderLayer(ref float timeOfTheDay, EditorToolMeasurements toolSize, Config3DPlanar 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.timeSpan_start); |
| 0 | 24 | | SkyboxEditorUtils.ClampToDayTime(ref config.timeSpan_End); |
| | 25 | |
|
| | 26 | | // Fading |
| 0 | 27 | | RenderSimpleValues.RenderSepratedFloatFields(SkyboxEditorLiterals.LayerProperties.fade, SkyboxEditorLiterals |
| | 28 | |
|
| 0 | 29 | | GameObject tempPrefab = config.prefab; |
| 0 | 30 | | RenderSimpleValues.RenderPrefabInput("Prefab", ref tempPrefab); |
| 0 | 31 | | config.AssignNewPrefab(tempPrefab); |
| | 32 | |
|
| | 33 | |
|
| 0 | 34 | | if (!config.validPrefab) |
| | 35 | | { |
| 0 | 36 | | Color color = GUI.color; |
| 0 | 37 | | GUI.color = Color.red; |
| 0 | 38 | | EditorGUILayout.LabelField(config.inValidStr, GUILayout.Width(400), GUILayout.ExpandWidth(false)); |
| 0 | 39 | | GUI.color = color; |
| 0 | 40 | | config.prefab = null; |
| | 41 | | } |
| | 42 | |
|
| 0 | 43 | | RenderSimpleValues.RenderFloatField(SkyboxEditorLiterals.Planar3D.SCENE, ref config.radius); |
| 0 | 44 | | RenderSimpleValues.RenderFloatField(SkyboxEditorLiterals.Planar3D.Y_POS, ref config.yPos); |
| 0 | 45 | | RenderSimpleValues.RenderBoolField(SkyboxEditorLiterals.Planar3D.FOLLOW_CAMERA, ref config.followCamera); |
| 0 | 46 | | RenderSimpleValues.RenderBoolField(SkyboxEditorLiterals.Planar3D.RENDER_IN_MAIN_CAMERA, ref config.renderWit |
| 0 | 47 | | } |
| | 48 | | } |
| | 49 | | } |