Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
GUILayout.TextField:s dont work with CurveySplines
#1
Hello!
We use CurveySplines as one of the tools for our upcoming game. We also use other tools that utilize the GUILayout.TextField (input fields in the SceneView window). But it seems that GUILayout.TextField dont work when CurveySplines is inside the Asset folder. And work as they should when CurveySplines is removed. GUILayout.TextField are displayed in the SceneView but will not be active on mouse press and you cant change the input value.

We are developing on Mac and use Unity version 2021.3.16f1.

Test case:
Code:
using UnityEngine;
using UnityEditor;

public class Test {
  [UnityEditor.Callbacks.DidReloadScripts]
  private static void DidReloadScripts() {
    SceneView.duringSceneGui += OnSCeneGUI;
  }

  private static void OnSCeneGUI(SceneView sceneView) {
    Handles.BeginGUI();

    GUILayout.BeginArea(new Rect(300, 300, 200, 60));
    GUILayout.TextField("testing");
    GUILayout.EndArea();

    Handles.EndGUI();
  }
}
Reply
#2
Hi
I am on it. What version of Curvy Splines do you use?
Please consider leaving a review for Curvy. This will help a lot keeping Curvy relevant in the eyes of the Asset Store algorithm.
Reply
#3
Hi again.
I tested the code you posted. It does not work, regardless of whether Curvy Splines is installed or not, simply because the code is set to display "testing" all the time. It is only normal that you can not modify it. Here is the corrected code, to make the text modifiable:

Code:
using UnityEngine;
using UnityEditor;

public class Test {
  [UnityEditor.Callbacks.DidReloadScripts]
  private static void DidReloadScripts() {
    SceneView.duringSceneGui += OnSCeneGUI;
  }
  private static string stringToEdit = "testing";

  private static void OnSCeneGUI(SceneView sceneView) {
    Handles.BeginGUI();

    GUILayout.BeginArea(new Rect(300, 300, 200, 60));
    stringToEdit = GUILayout.TextField(stringToEdit);
    GUILayout.EndArea();

    Handles.EndGUI();
  }
}

Notice the inclusion of stringToEdit.

With this version of the code, the text field is modifiable, whether Curvy Splines is installed or not. I tested using various Unity versions, and using the latest Curvy Splines version.

Please let me know if you still have issues with the code above, and the latest Curvy Splines. If so, attaching a video showing the issue would make debugging easier.

Have a nice day
Please consider leaving a review for Curvy. This will help a lot keeping Curvy relevant in the eyes of the Asset Store algorithm.
Reply
#4
Thanks for your answer. You can't edit the text in the test case I posted but you should be able to activate the input field by pressing it (blue bar around the box). But the field cant be activated when curvey splin is active. And it can be activated when curvey splines is removed.

Curvey version: 8.6.1

Clip about the problem: https://www.youtube.com/watch?v=HvUxqr2M-YA
Reply
#5
Please update to the latest version of Curvy Splines, this should solve your issue. If it doesn't please let me know here.
Have a nice day
Please consider leaving a review for Curvy. This will help a lot keeping Curvy relevant in the eyes of the Asset Store algorithm.
Reply
#6
Updating to latest curve splines did solve it. Thanks for your help.

Have a nice day.
Reply
#7
You are welcome.
If and when you feel like it, please leave a review for the asset, that helps a lot.
Have a nice day.
Please consider leaving a review for Curvy. This will help a lot keeping Curvy relevant in the eyes of the Asset Store algorithm.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Connections doesn't work in split scenes nehvaleem 2 1 Yesterday, 06:53 PM
Last Post: _Aka_
Question How to modify Example 12 to work bi-directionally and more than 2 connected splines Mambosa 3 17 11-29-2022, 06:59 PM
Last Post: _Aka_
  Great product! Documentation needs work! blabz2007 3 544 08-28-2021, 08:52 AM
Last Post: _Aka_
  How do waypoint collisions work? funkd 1 2,363 05-21-2019, 10:29 PM
Last Post: _Aka_

Forum Jump: