public override void OnInspectorGUI() { //sky.Profile = EditorGUILayout.ObjectField("Profile", sky.Profile, typeof(JSkyProfile), false) as JSkyProfile; sky.Profile = JEditorCommon.ScriptableObjectField <JSkyProfile>("Profile", sky.Profile); profile = sky.Profile; if (sky.Profile == null) { return; } DrawSceneReferencesGUI(); EditorGUI.BeginChangeCheck(); DrawSkyGUI(); DrawStarsGUI(); DrawSunGUI(); DrawMoonGUI(); DrawHorizonCloudGUI(); DrawOverheadCloudGUI(); DrawDetailOverlayGUI(); DrawUtilitiesGUI(); if (EditorGUI.EndChangeCheck()) { profile.UpdateMaterialProperties(); } DrawAddDayNightCycleGUI(); }
public override void OnInspectorGUI() { sky.Profile = JEditorCommon.ScriptableObjectField <JSkyProfile>("Profile", sky.Profile); profile = sky.Profile; if (sky.Profile == null) { return; } dnc = sky.GetComponent <JDayNightCycle>(); DrawSceneReferencesGUI(); EditorGUI.BeginChangeCheck(); DrawSkyGUI(); DrawStarsGUI(); DrawSunGUI(); DrawMoonGUI(); DrawHorizonCloudGUI(); DrawOverheadCloudGUI(); DrawDetailOverlayGUI(); DrawUtilitiesGUI(); if (EditorGUI.EndChangeCheck()) { profile.UpdateMaterialProperties(); EditorUtility.SetDirty(sky); EditorUtility.SetDirty(profile); } DrawAddDayNightCycleGUI(); }
public void DrawGUI() { EditorGUI.BeginChangeCheck(); DrawSkyGUI(); DrawStarsGUI(); DrawSunGUI(); DrawMoonGUI(); DrawHorizonCloudGUI(); DrawOverheadCloudGUI(); DrawDetailOverlayGUI(); DrawUtilitiesGUI(); if (EditorGUI.EndChangeCheck()) { instance.UpdateMaterialProperties(); } }