diff --git a/Runtime/Editor.meta b/Runtime/Editor.meta new file mode 100644 index 0000000..c3f7dc6 --- /dev/null +++ b/Runtime/Editor.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 89697bd3eef54167a54c29dfc19de1e3 +timeCreated: 1722596548 \ No newline at end of file diff --git a/Runtime/Editor/HorizontalLayoutEditor.cs b/Runtime/Editor/HorizontalLayoutEditor.cs new file mode 100644 index 0000000..99e87b8 --- /dev/null +++ b/Runtime/Editor/HorizontalLayoutEditor.cs @@ -0,0 +1,32 @@ +using jp.ootr.common; +using UnityEditor; + +namespace jp.ootr.WeatherWidget.Editor +{ + [CustomEditor(typeof(HorizontalLayout))] + public class HorizontalLayoutEditor : UnityEditor.Editor + { + private bool _debug; + public override void OnInspectorGUI() + { + var script = (HorizontalLayout)target; + + _debug = EditorGUILayout.ToggleLeft("Debug", _debug); + if (_debug) + { + base.OnInspectorGUI(); + return; + } + EditorGUI.BeginChangeCheck(); + EditorGUILayout.LabelField("WeatherWidget", EditorStyle.UiTitle); + + EditorGUILayout.Space(); + + EditorGUILayout.LabelField("Forecast Count"); + script.forecastCount = (int)EditorGUILayout.Slider(script.forecastCount, 3, 7); + + if (!EditorGUI.EndChangeCheck()) return; + EditorUtility.SetDirty(script); + } + } +} \ No newline at end of file diff --git a/Runtime/Editor/HorizontalLayoutEditor.cs.meta b/Runtime/Editor/HorizontalLayoutEditor.cs.meta new file mode 100644 index 0000000..d96eb03 --- /dev/null +++ b/Runtime/Editor/HorizontalLayoutEditor.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 5eb13d00830d4f30b7620ecfcaa71d7c +timeCreated: 1722596569 \ No newline at end of file diff --git a/Runtime/jp.ootr.WeatherWidget/Scripts/HorizontalLayout.cs b/Runtime/jp.ootr.WeatherWidget/Scripts/HorizontalLayout.cs index 4324553..66fbf07 100644 --- a/Runtime/jp.ootr.WeatherWidget/Scripts/HorizontalLayout.cs +++ b/Runtime/jp.ootr.WeatherWidget/Scripts/HorizontalLayout.cs @@ -15,7 +15,7 @@ public class HorizontalLayout : Copy [SerializeField] private TextMeshProUGUI tempText; [SerializeField] private TextMeshProUGUI popText; [SerializeField] private TextMeshProUGUI overviewText; - [SerializeField] private int forecastCount; + [SerializeField] public int forecastCount; protected override void OnWeatherLoadSuccess(WeatherData data) { diff --git a/WeatherScene.unity b/WeatherScene.unity index 39f8faf..9cf890b 100644 --- a/WeatherScene.unity +++ b/WeatherScene.unity @@ -386,7 +386,7 @@ MonoBehaviour: m_EditorClassIdentifier: launchedFromSDKPipeline: 0 completedSDKPipeline: 0 - blueprintId: wrld_a9c7d59d-2a8f-4489-aa7a-a51eb6fbbb38 + blueprintId: contentType: 1 assetBundleUnityVersion: fallbackStatus: 0 @@ -705,10 +705,6 @@ PrefabInstance: serializedVersion: 3 m_TransformParent: {fileID: 0} m_Modifications: - - target: {fileID: 3519630885417581180, guid: ade2b3e357669fe40a82979e908a520c, type: 3} - propertyPath: weatherApiUrl.url - value: https://weather.ootr.jp/api?geoPosId=130010 - objectReference: {fileID: 0} - target: {fileID: 3519630885417581180, guid: ade2b3e357669fe40a82979e908a520c, type: 3} propertyPath: serializationData.Prefab value: