diff --git a/package/Editor/PlanarProjection/PlanarProjection.cs b/package/Editor/PlanarProjection/PlanarProjection.cs index 2396665..489e829 100644 --- a/package/Editor/PlanarProjection/PlanarProjection.cs +++ b/package/Editor/PlanarProjection/PlanarProjection.cs @@ -386,7 +386,7 @@ public void OpenPromptWindow() SetControlNetOptions(); InferenceManager.SilenceMode = true; promptWindow.SetImageSettingWidth(1824); - promptWindow.SetImageSettingHeight(1024); + //promptWindow.SetImageSettingHeight(1024); } } @@ -513,9 +513,9 @@ private void GetAllScenarioTagObject() break; } - if (tagged[i].transform.childCount > 0) - { - + if (tagged[i].transform.childCount > 0 && referenceObject == null) + { + referenceObject = tagged[i]; } } } @@ -1206,7 +1206,7 @@ IEnumerator CloseRecorder() recorderWindow.Close(); recorderWindow = null; - yield return new EditorWaitForSeconds(2f); + yield return new EditorWaitForSeconds(1f); directoryInfo = new DirectoryInfo($"{Application.dataPath}/Recordings"); LoadLastCapture(); diff --git a/package/Editor/PlanarProjection/PlanarProjectionView.cs b/package/Editor/PlanarProjection/PlanarProjectionView.cs index 0e1ff8e..6eedf3f 100644 --- a/package/Editor/PlanarProjection/PlanarProjectionView.cs +++ b/package/Editor/PlanarProjection/PlanarProjectionView.cs @@ -128,7 +128,11 @@ private void BasicPrepareView() } planarProjection.ReferenceObject = (GameObject)EditorGUILayout.ObjectField(planarProjection.ReferenceObject, typeof(GameObject), true); - + if (planarProjection.ReferenceObject != null) + { + if(!planarProjection.ReferenceObject.tag.Equals("Scenario Object Projection")) + planarProjection.ReferenceObject.tag = "Scenario Object Projection"; + } if (GUILayout.Button("Auto configure scene", button)) diff --git a/package/Editor/PromptWindow/PromptWindow.cs b/package/Editor/PromptWindow/PromptWindow.cs index 8c14bc3..e97542e 100644 --- a/package/Editor/PromptWindow/PromptWindow.cs +++ b/package/Editor/PromptWindow/PromptWindow.cs @@ -144,6 +144,27 @@ public void SetAdvancedModalityValue(int _value) public void SetImageSettingWidth(int _indexValue) { promptWindowUI.WidthSliderValue = _indexValue; + + if (_indexValue >= 1024) + { + for (int i = 0; i < promptWindowUI.allowedSDXLDimensionValues.Length; i++) + { + if (_indexValue == promptWindowUI.allowedSDXLDimensionValues[i]) + { + promptWindowUI.sizeSliderValue = 7 - i; + } + } + } + else if(_indexValue <= 912) + { + for (int i = 0; i < promptWindowUI.allowed1_5DimensionValues.Length; i++) + { + if (_indexValue == promptWindowUI.allowed1_5DimensionValues[i]) + { + promptWindowUI.sizeSliderValue = 7 - i; + } + } + } } ///