< Summary

Class:DCL.Skybox.RenderSimpleValues
Assembly:SkyboxEditorAssembly
File(s):/tmp/workspace/unity-renderer/unity-renderer/Assets/Rendering/ProceduralSkybox/ToolProceduralSkybox/Scripts/Editor/Procedural Skybox/SimpleValuesRendering/RenderSimpleValues.cs
Covered lines:0
Uncovered lines:55
Coverable lines:55
Total lines:96
Line coverage:0% (0 of 55)
Covered branches:0
Total branches:0

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity NPath complexity Sequence coverage
RenderSepratedFloatFields(...)0%2100%
RenderFloatField(...)0%2100%
RenderFloatFieldAsSlider(...)0%2100%
RenderVector3Field(...)0%2100%
RenderVector2Field(...)0%2100%
RenderTexture(...)0%2100%
RenderCubemapTexture(...)0%2100%
RenderColorGradientField(...)0%12300%

File(s)

/tmp/workspace/unity-renderer/unity-renderer/Assets/Rendering/ProceduralSkybox/ToolProceduralSkybox/Scripts/Editor/Procedural Skybox/SimpleValuesRendering/RenderSimpleValues.cs

#LineLine coverage
 1using System.Collections;
 2using System.Collections.Generic;
 3using UnityEditor;
 4using UnityEngine;
 5
 6namespace DCL.Skybox
 7{
 8    public static class RenderSimpleValues
 9    {
 10        public static void RenderSepratedFloatFields(string label, string label1, ref float value1, string label2, ref f
 11        {
 012            GUILayout.BeginHorizontal(GUILayout.ExpandWidth(false));
 013            EditorGUILayout.LabelField(label, GUILayout.Width(150), GUILayout.ExpandWidth(false));
 014            EditorGUILayout.LabelField(label1, GUILayout.Width(90), GUILayout.ExpandWidth(false));
 015            value1 = EditorGUILayout.FloatField("", value1, GUILayout.Width(90));
 016            EditorGUILayout.LabelField(label2, GUILayout.Width(90), GUILayout.ExpandWidth(false));
 017            value2 = EditorGUILayout.FloatField("", value2, GUILayout.Width(90));
 018            GUILayout.EndHorizontal();
 019            EditorGUILayout.Separator();
 020        }
 21
 22        public static void RenderFloatField(string label, ref float value)
 23        {
 024            EditorGUILayout.BeginHorizontal(GUILayout.ExpandWidth(false));
 025            EditorGUILayout.LabelField(label, GUILayout.Width(150), GUILayout.ExpandWidth(false));
 026            value = EditorGUILayout.FloatField(value, GUILayout.Width(90));
 027            EditorGUILayout.EndHorizontal();
 028            EditorGUILayout.Separator();
 029        }
 30
 31        public static void RenderFloatFieldAsSlider(string label, ref float value, float min, float max)
 32        {
 033            EditorGUILayout.BeginHorizontal(GUILayout.ExpandWidth(false));
 034            EditorGUILayout.LabelField(label, GUILayout.Width(150), GUILayout.ExpandWidth(false));
 035            value = EditorGUILayout.Slider(value, min, max, GUILayout.Width(200));
 036            EditorGUILayout.EndHorizontal();
 037            EditorGUILayout.Separator();
 038        }
 39
 40        public static void RenderVector3Field(string label, ref Vector3 value)
 41        {
 042            GUILayout.BeginHorizontal(GUILayout.ExpandWidth(false));
 043            EditorGUILayout.LabelField(label, GUILayout.Width(150), GUILayout.ExpandWidth(false));
 044            value = EditorGUILayout.Vector3Field("", value, GUILayout.Width(200), GUILayout.ExpandWidth(false));
 045            GUILayout.EndHorizontal();
 046            EditorGUILayout.Separator();
 047        }
 48
 49        public static void RenderVector2Field(string label, ref Vector2 value)
 50        {
 051            GUILayout.BeginHorizontal(GUILayout.ExpandWidth(false));
 052            EditorGUILayout.LabelField(label, GUILayout.Width(150), GUILayout.ExpandWidth(false));
 053            value = EditorGUILayout.Vector2Field("", value, GUILayout.Width(200), GUILayout.ExpandWidth(false));
 054            GUILayout.EndHorizontal();
 055            EditorGUILayout.Separator();
 056        }
 57
 58        public static void RenderTexture(string label, ref Texture2D tex)
 59        {
 060            GUILayout.BeginHorizontal(GUILayout.ExpandWidth(false));
 061            EditorGUILayout.LabelField(label, GUILayout.Width(150), GUILayout.ExpandWidth(false));
 062            tex = (Texture2D)EditorGUILayout.ObjectField(tex, typeof(Texture2D), false, GUILayout.Width(200));
 063            GUILayout.EndHorizontal();
 064            EditorGUILayout.Separator();
 065        }
 66
 67        public static void RenderCubemapTexture(string label, ref Cubemap tex)
 68        {
 069            GUILayout.BeginHorizontal(GUILayout.ExpandWidth(false));
 070            EditorGUILayout.LabelField(label, GUILayout.Width(150), GUILayout.ExpandWidth(false));
 071            tex = (Cubemap)EditorGUILayout.ObjectField(tex, typeof(Cubemap), false, GUILayout.Width(200));
 072            GUILayout.EndHorizontal();
 073            EditorGUILayout.Separator();
 074        }
 75
 76        public static void RenderColorGradientField(Gradient color, string label = SkyboxEditorLiterals.color, float sta
 77        {
 078            GUILayout.BeginHorizontal(GUILayout.ExpandWidth(false));
 079            EditorGUILayout.LabelField(label, GUILayout.Width(150), GUILayout.ExpandWidth(false));
 80
 081            if (startTime != -1)
 82            {
 083                EditorGUILayout.LabelField(startTime + SkyboxEditorLiterals.short_Hour, GUILayout.Width(65), GUILayout.E
 84            }
 85
 086            color = EditorGUILayout.GradientField(new GUIContent(""), color, hdr, GUILayout.Width(250), GUILayout.Expand
 87
 088            if (endTime != 1)
 89            {
 090                EditorGUILayout.LabelField(endTime + SkyboxEditorLiterals.short_Hour, GUILayout.Width(65), GUILayout.Exp
 91            }
 092            GUILayout.EndHorizontal();
 093            EditorGUILayout.Separator();
 094        }
 95    }
 96}